[AccessD] Where to place path constants?

Ryan W wrwehler at gmail.com
Sun Mar 6 09:46:41 CST 2022


I like to place them in a setup table and then look them up into a global variable or tempvar on startup. That way if you need to change the path you change it in the DB and don’t have to change a constant in code and redistribute a new FE. 



Sent from my iPhone

> On Mar 6, 2022, at 9:34 AM, Gustav Brock via AccessD <accessd at databaseadvisors.com> wrote:
> 
> Hi Arthur
> 
> Perhaps: CurrentProject.Path
> 
> /gustav
> 
> Fra: Arthur Fuller<mailto:fuller.artful at gmail.com>
> Sendt: 6. marts 2022 14:08
> Til: Access Developers discussion and problem solving<mailto:accessd at databaseadvisors.com>
> Emne: [AccessD] Where to place path constants?
> 
> I'm revising an app that assumes some paths based on the drive letter and
> the project path. At the moment, it uses constants that are scattered
> throughout the app. I want to move them all into a single module,
> tentatively called modPathConstants, to minimize the find and replace
> hassles. Actually, the only thing that will change is the drive letter. The
> directory and subdirectory names will remain the same.
> I vaguely recall a function called ProjectPath() or somesuch. Guidance
> requested.
> 
> --
> Arthur
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list