General information
Category:
Coding, syntax & commands
>>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only