I have a form which searches certain fields in my database for the information entered and displays the results. I am having trouble understanding why only certain records are returned even though more records match the query. I think it has something to do with the fact that the form searches multiple tables which are linked and it has problems if a linked table has no matching records. If you think this may be the problem, does any one know any work arounds or other methods to accomplish the same thing?
This is my code for when you click on the search form button:
DoCmd.OpenForm "Proj_Results", acNormal, , "(Proj_Name Like '*" & Proj_Name & "*') AND (Proj_ID Like '*" & Proj_ID & "*') AND (Approved_By Like '*" & Approved_By & "*') AND (Requested_By Like '*" & Requested_By & "*') AND (Map_ID Like '*" & Map_ID & "*') AND (Report_ID Like '*" & Report_ID & "*') AND (SQL_ID Like '*" & SQL_ID & "*')", acFormReadOnly
The Map_ID, Report_ID, and SQL_ID are in other tables and not every Project is connected to Maps, Reports, or SQL data.
-Andi
This is my code for when you click on the search form button:
DoCmd.OpenForm "Proj_Results", acNormal, , "(Proj_Name Like '*" & Proj_Name & "*') AND (Proj_ID Like '*" & Proj_ID & "*') AND (Approved_By Like '*" & Approved_By & "*') AND (Requested_By Like '*" & Requested_By & "*') AND (Map_ID Like '*" & Map_ID & "*') AND (Report_ID Like '*" & Report_ID & "*') AND (SQL_ID Like '*" & SQL_ID & "*')", acFormReadOnly
The Map_ID, Report_ID, and SQL_ID are in other tables and not every Project is connected to Maps, Reports, or SQL data.
-Andi