I am getting a runtime error 3024. Could not find file 'C:\Documents and Settings\salmcsreports\My Documents\dbo.mdb'. I added some code to an existing query that was not giving me any errors but was not giving me the results I needed so I had to add a like function. The code on the bottom is from a query that I wrote that does give me the results I need.
Tom
Tom
Code:
strSQL = "SELECT c.uci,r.rpttitle,r.grp1 " & _
"FROM dbo_rptq_rpts r " & _
"INNER JOIN dbo.rpt_Clients c ON c.clntid = r.clntid " & _
"WHERE c.uci='" & GetUCI(liCl) & "'" & " AND r.rpttitle like '*Charge Detail*'"
Debug.Print strSQL
'Code from regular query in Access
'SELECT dbo_dic_Client.uci, dbo_rptq_rpts.rpttitle, dbo_rptq_rpts.grp1
'FROM dbo_rptq_rpts
'INNER JOIN dbo_dic_Client ON dbo_rptq_rpts.clntid = dbo_dic_Client.clid
'WHERE (((dbo_dic_Client.uci) = "LAT") And ((dbo_rptq_rpts.rpttitle) Like "*Charge Detail*"))
'ORDER BY dbo_dic_Client.uci, dbo_rptq_rpts.rpttitle;
Set rstORDER = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)