Normal Topic @PopupMenu In Subform - Table View (Read 1158 times)
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
@PopupMenu In Subform - Table View
May 20th, 2004 at 3:17pm
Print Post Print Post  
I am trying to get the @PopupMenu to work in the table view of a subform. I want the user to be able to select from a list of possible values. I put the code into the @Element Entry field and when I enter the field it pops up the list (which is in the top right hand corner - can I cahnge where it pops relative to the field?) and I then selec tthe one I want. If I click back on the same field it displays the value otherwise as soon as I exit the field it goes back to a blank field - anyone have any ideas?
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @PopupMenu In Subform - Table View
Reply #1 - May 20th, 2004 at 4:14pm
Print Post Print Post  
Quote:
can I cahnge where it pops relative to the field?)


I do not believe there is a method to control the placement of the box at this time.

Quote:
I am trying to get the @PopupMenu to work in the table view of a subform. I want the user to be able to select from a list of possible values. I put the code into the @Element Entry field and when I enter the field it pops up the list which is in the top right hand corner -  and I then selec tthe one I want. If I click back on the same field it displays the value otherwise as soon as I exit the field it goes back to a blank field - anyone have any ideas?

Justin,

I am not shure I am understanding the question,  are you poping up a set of  choices based on what you just typed in the field  or is it always the same choices you want popped up?

If it is always the same choices I would add logic that only presents the popup if element is empty using @IsBlank() command  if it is blank it will pop up choices on entry if not nothing happens

If it is popping up choices based on what you type in a field I would add a command button to click on after typing keyword in the field. This way it only pops when you want.

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: @PopupMenu In Subform - Table View
Reply #2 - May 20th, 2004 at 6:35pm
Print Post Print Post  
Quote:
I am not shure I am understanding the question,  are you poping up a set of  choices based on what you just typed in the field  or is it always the same choices you want popped up?


It is always the same choices And I plan on putting code to only pop it up if is blank. The problem is it isn't retaining the choice I make as soon as I exit the field.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @PopupMenu In Subform - Table View
Reply #3 - May 20th, 2004 at 7:12pm
Print Post Print Post  
Quote:
The problem is it isn't retaining the choice I make as soon as I exit the field.


Sorry Justin I misunderstood your problem.  Embarrassed

Wow, so you are saying the data is going into the element but it vanishes when you exit the element?

All I can say is you have me stumped (I know it does not take much) Grin

I have a bunch of popups on subforms and they are working well. When you figure something out about yours let us know so we can learn from your journey.

Maybe if you  post your code  someone will notice if something is wrong.

Keep us posted
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: @PopupMenu In Subform - Table View
Reply #4 - May 20th, 2004 at 7:23pm
Print Post Print Post  
The code is incredibly simple - create a form.

Create a second form to be the table form.

On one of the elements in the table form add the following code on Element Entry:
<LE NAME> = @Popupmenu("Choice 1;Choice 2;Choice 3");

go back to the first form and create a subform of second form. set it to table view. Go to the field in question it should pop up a list of choices, if you choose one nothign is put into the field - now if you click back into the field without exiting it pops up the list again but it displays your choice now in the field. If you try to exit at this point or immediately after making your choice it will leave an empty field.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @PopupMenu In Subform - Table View
Reply #5 - May 21st, 2004 at 1:45am
Print Post Print Post  
Justin,

I see what is happening. If you exit before actually making a selection from the menu, a blank/empty value is passed to the LE, effectively deleting what was in the element before entering it.

Here's the fix:
Code
Select All
var vStr as string

vStr = @Popupmenu("Choice 1;Choice 2;Choice 3","Menu Title")

If vStr <> ""
 [LE Name] = vStr
 


BTW, your code sample lacked the menu title portion in @PopUpMenu().
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: @PopupMenu In Subform - Table View
Reply #6 - May 25th, 2004 at 3:49pm
Print Post Print Post  
It also vanishes after you select an item from the menu.

Oops I did forget the title but it wasn't a copy from my code. I'll have to play with it some more when I have some time again.
  
Back to top
 
IP Logged