Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table join on continuous form

Status
Not open for further replies.

spinalwiz

Programmer
Feb 25, 2003
32
IT
I have a simple continuous form with the fields:

Date Task Room


My problem is that 'Room' just shows the Room ID rather than the Room name. So I need it to be linked to my Room table to get the actual Room name.

Any ideas? (any will do but preferably SQL)
 
Are you using your form for Data entry or to display information already held.

Either way i'm guessing your form based on a query. In the query link the tables via the RoomID fields. This will allow you to select the 'roomname' as a field, you can then make'roomname' the data source of one of you unbound text boxes.

Alternatively use DLOOKUP

=DLookUp("[roomname]","tblRoomNames","[roomID] = " & [Room])

All the best

Stephen
 
Thanks. Im so used to using SQL for everything I often forget about dlookup. And am I right in thinking it cant lookup information spread over multiple tables?

Thanks
 
You can perform an SQL query on multiple tables as long as there is a common field betweeen each set of tables.

There's always a better way. The fun is trying to find it!
 
Sorry, I mean can you use Dlookup to lookup information spread over multiple tables?
 
I suppose you could us an iif statement. Look to your first table for a value, if this returns nothing go to a second table.

This is an extremely awkward way of doing this. The Dlookp can also be quit sluggish. I'd try going down the SQL route.

Regards

Stephen



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top