Dealing with spaces in a path name

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
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
 
Back
Top