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!

Runtime error 3024 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
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

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)
 
What do you get when you paste the SQL into a blank query?

Which SQL isn't working? There is no mention of "C:\Documents...." anywhere in your code or SQL.

This looks like the period should be replaced with an underscore

Code:
INNER JOIN dbo.rpt_Clients c ON

Duane
Hook'D on Access
MS Access MVP
 
Thanks I was going back and forth between SQL and Access and the spelling of the tables is different.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top