Error with IN

kirkm

Registered User.
Local time
Tomorrow, 07:04
Joined
Oct 30, 2008
Messages
1,257
Am getting a problem with

Code:
Set db = CurrentDb
   SQL = "SELECT TLabel FROM Tracks" & _
         "IN '\\PETER\List\ListBE.mdb';"
   Set rst = db.OpenRecordset(SQL, dbOpenDynaset)

Run—time error '3125':
”\\PETER\List\ListBE.mdb" is not a valid name. Make sure that it
does not include invalid characters or punctuation and that it is not too
long.

However I can browse to ListBE.mdb via Network in Explorer. Is "\\" not allowed or needs changing?
 
You can open the database?

Set db =opendatabase("\\PETER\List\ListBE.mdb",0,0)

Set rst=db.openrecordset("select tlabel from tracks")
 
Thanks Arne, yes I can now open it, and my original query works. I'm not quite sure what was wrong... it may have been something else but showing at the point. I did not know you could have Set db =opendatabase and that will be a huge help.
 

Users who are viewing this thread

Back
Top Bottom