Dealing with spaces in a path name

J

Jim Pockmire

The following code uses CurrentProject.Path to create a string used to set a
reference to another mdb. The procedure works fine except when there are
spaces in the path or file name. How can I make it work if spaces exist?

strPath = CurrentProject.Path
strPathFile = ";DATABASE=" & strPath & "\" & strMdb
Set tdf = db.CreateTableDef(strName)
tdf.Connect = strPathFile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top