View Full Version : Clever Lookup?


tacieslik
01-15-2002, 02:05 AM
I have a form with a subform. In the subform, there is a field called Location. I need this field to lookup a value in a table or query. The thing is, I only want the location to be entered if it has not already been selected in another record of that form.

To explain myself better, the location is for a racking system. The user will create a list of parts, and a location will be given. Each location is to be unique. I think it can be done. Any help would be great.

TAC

Rich
01-15-2002, 02:09 AM
Use a combo box, the wizard will build one for you.

tacieslik
01-15-2002, 02:38 AM
Thanks for the reply.

Would I be right in saying that the combo would need to be based on a query rather than a table? The reason I say this is because when a position has already been selected from the combo for the first record, I don't want it to be in the combo for the next record.
TAC

Pat Hartman
01-15-2002, 04:42 AM
The combobox should be based on an "unmatched" query since you only want rows from tableA that do not have a match in tableB.

tacieslik
01-15-2002, 05:07 AM
Can you explain a bit more Pat?

Thanks for your time

TAC

tacieslik
01-15-2002, 08:05 AM
I could really do with some help on this. I can send the DB if it would help anyone?

TAC

LQ
01-15-2002, 11:01 AM
If you want to create the "unmatched" query Pat suggested, on the queries tab in your db click on the New button on the right hand side and then choose the Find Unmatched Query Wizard. It's pretty self-explanatory...