thanks. it works. here's my new sql statement:
sql="SELECT tblCustomers.*, tblTestOrder.*, tblAbrasions.* FROM ((tblCustomers INNER JOIN tblTestOrder ON tblCustomers.CustID = tblTestOrder.CustomerID) INNER JOIN tblAbrasions ON tblTestOrder.TestOrderID = tblAbrasions.TestID) WHERE TestRequestNo= '" &PO& "'"
are there limitations as to how many table i can put in the Select statement? the reason for asking this question is that tblCustomers contains only the customer information. tblTestOrder contains the date required, date submit, which test to perform (16 different tests), etc. Each test result is store in its own table with testid as a foreign key to the test result table.
a customer can request multiple tests to be perform. the select statement above only retreive the test result from tblAbrasions; how can i add the rest of the other test results from the other tables?
Also can i use the same variable name in each different table?
many thanks

|