Runtime Error 13

ddrew

seasoned user
Local time
Today, 14:50
Joined
Jan 26, 2003
Messages
911
I'm getting a runtime error 13 on this line of code. Its a piece of code to make a directory, but I cant see anything wrong!

Code:
    strBackUpDogNameFolder = "c:\GPandDetectionDogTrainingLogBackUpsandReports\" & Forms![frm_Profile]![Discipline] \ " & Forms![frm_Profile]![DogName]"
 
Why do you have spaces around the 2nd "/"? " / "
 
Why do you have spaces around the 2nd "/"? " / "
Do you mean this bit:
Code:
 \ " & Forms![frm_Profile]![DogName]"

It put them in automaticaly
 
You are mssing an ampersand and quotation mark

... & Forms![frm_Profile]![Discipline] & "\" & Forms![frm_Profile]![DogName]"
 
Can you remove them? I would also use a dot "." rather than a bang "!" in your Forms reference.
 
Also notice you have a surplus quotation mark at the end and you also need to ensure the dogname has a filetype - .jpg or whatever. Or add it on after e.g.

...& Forms![frm_Profile]![DogName] & ".jpg"
 
Also notice you have a surplus quotation mark at the end and you also need to ensure the dogname has a filetype - .jpg or whatever. Or add it on after e.g.

...& Forms![frm_Profile]![DogName] & ".jpg"

DoigName is a Subfolder, works once I had put in the & and " and removed the last "

Many thanks
 

Users who are viewing this thread

Back
Top Bottom