Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limiting choice in drop down list
Message
From
05/10/1998 19:02:33
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
05/10/1998 18:24:51
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00143999
Message ID:
00144065
Views:
29
>>>OK. I have a table with inspectors names in it and on one of the forms I have a drop down list to select the name of the person who did the inspection. So far so good. However, from time to time inspectors leave but the buildings they inspected don't. I want to have the building form still display the name of the inspector who did the inspection, in the collapsed drop down, whether he is still with the department or not. But the user should only be able to choose an inpector for a new job who is active (there is a flag in the inspectors table stating whether or not he is active). The user should not be able to type in a name - hence the drop down LIST. Ideas on the best way to accomplish this gratefully received. TIA.
>>
>>
>>Populate your list box from a select that only selects inspectors where ACTIVE = .T.
>
>Did that but then the inactive inspectors don't show up in the old building records.

Don't use the same query file to do the look ups or relationship in your other display.

What I have started to do is make all my combo boxes as a type 0. I then build them from my cursors using addlistitem. I do this because I have a data environment object attached to the list box so it loads it's own cursor. This is good for codes. The problem was though, the same code table is used for diffent drop downs (each with it own parameter) and the last select seemed to populate all the lists. With addlistitem, I build each list individually. You could do the same thing, and in your base class, exclude adding any item where the active flag was false.

By the way, I am going to bring my PC on Wednesday for the demo and discussion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform