Full Version: Convert code to string
UtterAccess Discussion Forums > Microsoft® Access > Access Modules
fldennis
How do you convert "CurrentProject.Path" to a string so that­ I can use as a public const
it in other code, what is the best way to do that?
strive4peace
dim mPath a string
mPath = CurrentProject.Path & "\"

but why don't you just use CurrentProject.Path when you need it? Global variables can be forgotten so it is best not to use them if you don't need to
fldennis
Sometimes you get so wrapped up in what you think you want to do you forget the KISS principle. "Keep it simple stupid"

Thanks.
strive4peace
you're welcome wink.gif

the simplest solution is usually the hardest one to find
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.