Problem if i chnage the database name

Rameez

Registered User.
Local time
Today, 21:09
Joined
Jun 5, 2009
Messages
26
currently name of my database is tool.mdb...if i change it to some thing else...it won't work...how to remove this dependency...

the error is in this part of the code

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & CurrentProject.Path & "\tool.mdb;"

how to???


plz help

thanks

:confused:
 
What happens when you try to rename it, and change that line of code to reflect the new name?
 
If i give it to my reviewer and she renames it...then?

the code won't work and she will get a error...

so i want to remove dependency on name....:D
 
Without knowing anything about the context of the code, or what it is trying to achieve, it's really difficult to help.

You could try replacing the code with:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & CurrentDB.Name

But I have no idea if that will work, because you've not told us anything about the database.
 

Users who are viewing this thread

Back
Top Bottom