View Full Version : Lookup Query in an Open Table


Bigbro1985
07-08-2009, 01:58 AM
Hi

I am trying to make a lookup query, which will compare a field inside the same table with another table which the data is located in.

I attempted to write a SQL query how ever it has been un successfull.


SELECT Occupants.[Unit#] FROM Occupants WHERE Occupants.Residence=Inspection.Residence;


I keep on getting an input query box with "Inspection.Residence" displayed. Residance is a field in Inspection which is the open Table being edited.

I have a table which contains all the Residence information such as the occupant name, Residance location, and the Unit number inside the residance. I then have an inventory table where you select which residence, then you select a unit number inside that specific residence.

I'm not sure if my problem is because the Inspection table is being edited.

Please help!

DCrake
07-08-2009, 02:08 AM
You actually need a join between the two field in your query.

Bigbro1985
07-08-2009, 03:13 AM
You actually need a join between the two field in your query.
Do you mean a relationship? I have tried each of the relationship settings and got the same result each time.

Bigbro1985
07-16-2009, 01:47 AM
I found what i was looking for that should be in the form section though... but its exactly what i was looking for

http://www.blueclaw-db.com/download/dependent_combo_box.htm

Hope it helps some one else.