![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What is CurDir supposed to return. |
#3
| |||
| |||
|
|
"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote in news:j1ro55$g87$1 (AT) speranza (DOT) aioe.org: What is CurDir supposed to return. It returns the Current Directory as specified by your operating system. This may or may not be what you think it is. I find CurDir to be basically useless, as it's way to unpredictable what it's going to return. So, instead, I just make sure I specify paths in full in all cases. That way, I don't really need to know what the current directory is set to. |
#4
| |||
| |||
|
|
Originally I "hard wired" the path of the referenced database (Utilities.Accdb), but that path is different on different machines. ".\Utilities" works OK on the Windows 7 machine as I keep Utilities.AccDb in the same folder as the access application, but on the other machine, it cant finf the file as the pointer appears to go to My Documents instead of the folder where the database is stored. |
#5
| |||
| |||
|
|
On Wed, 10 Aug 2011 23:05:01 +0100, "Phil" <phil (AT) stantonfamily (DOT) co.uk wrote: I agree with David's comments on CurDir. Originally I "hard wired" the path of the referenced database (Utilities.Accdb), but that path is different on different machines. ".\Utilities" works OK on the Windows 7 machine as I keep Utilities.AccDb in the same folder as the access application, but on the other machine, it cant finf the file as the pointer appears to go to My Documents instead of the folder where the database is stored. application.CurrentDb.Name will give you the current path and name of your Access database file. From there you can parse out the path, etc. Tony |
#6
| |||
| |||
|
|
On Wed, 10 Aug 2011 23:05:01 +0100, "Phil" phil (AT) stantonfamily (DOT) co.uk> wrote: I agree with David's comments on CurDir. Originally I "hard wired" the path of the referenced database (Utilities.Accdb), but that path is different on different machines. ".\Utilities" works OK on the Windows 7 machine as I keep Utilities.AccDb in the same folder as the access application, but on the other machine, it cant finf the file as the pointer appears to go to My Documents instead of the folder where the database is stored. application.CurrentDb.Name will give you the current path and name of your Access database file. From there you can parse out the path, etc. |
![]() |
| Thread Tools | |
| Display Modes | |
| |