On the Fly Query - Help with more than 1 table

MAVIS

MAVIS
Local time
Today, 22:11
Joined
Apr 20, 2005
Messages
9
Good Afternoon to you all --- Help…….
Can someone please point me in the right direction regarding an 'on the fly query' that I have. The one that I currently use, and have great success with, involves extracting records by means of four combo boxes which point to the data held within a table called STAFF. I like this form of query method but would now like to take it one step further and to point it so that it looks at another table within my db and to search for data from another combo box entitled Shift Pattern. The combo values it’ll look for are Blue/Red/Amber/White within a table called ‘SHIFTS’.

This is what I previously used, and was great when kept within the confines of one table called STAFF. How do I go about pointing it at the SHIFTS table as well as the STAFF one so that I can search the data held within the 4 'SHIFT' fields. Any help would be gratefully appreciated...

Below is the bare bones of the SQL string that I used before:

strSQL = "SELECT STAFF.* " & _
"FROM STAFF " & _
"WHERE STAFF.PriRole" & strPRole & _
"AND STAFF.BadgeNo" & strBadgeNumb & _
"AND STAFF.FieldLineNo" & strLineNumb & _
"AND STAFF.PayRoleNumber" & strPayRolNo & _
"ORDER BY STAFF.FirstName;"

Ta very much for all your help so far - I've been most impressed.

Regards

Mavis. :)
 
Join the tables in your code.

RV
 

Users who are viewing this thread

Back
Top Bottom