Normal Topic PopulateListElement (Read 431 times)
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
PopulateListElement
Mar 23rd, 2004 at 10:07pm
Print Post Print Post  
If I have:

PopulateListElement(Occupation,"Nurse;Teacher;Doctor") in Global Code, shouldn't the LE contain this list value upon opening the form in Search/Update mode?

Thanx
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: PopulateListElement
Reply #1 - Mar 23rd, 2004 at 10:17pm
Print Post Print Post  
You need to use the OnFormEntry event for this.

When Global Code first runs, the Form and LE's do not yet exist. You can put functions and subroutines that refer to LE's in Global Code, and call them from SBasic events, but Global Code cannot affect the Form as it opens.

Global Code not contained in user-defined procedures should mainly be used for initializing global variables.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: PopulateListElement
Reply #2 - Mar 24th, 2004 at 4:39pm
Print Post Print Post  
Do you have any suggestions for the following:

I want to be able to populate a combo box in a subform using XListValues from a main form.  I only want this combo box to be visible in Add mode.  Is it possible to populate the combo box upon opening a form in Add mode?

Thanx
  
Back to top
IP Logged