lcInstallDir = sys(5) + sys(2003) lcPath = lcInstallDir + ";" + addbs(lcInstallDir) + "Data;" + addbs(lcInstallDir) + "Reports" set path to &lcPathFor multi-user:
use appuser lcInstallDir = sys(5) + sys(2003) lcDataDir = alltrim(appuser.datapath) use if not file(addbs(lcDataDir) + "Data\mydbc.dbc") do form GetDataPath to lcDataDir && modal form endif if empty(lcDataDir) return .f. && quit the app endif lcPath = lcInstallDir + ";" + addbs(lcDataDir) + "Data;" + addbs(lcDataDir) + "Reports" set path to &lcPathIf the path to the data can not be found, I prompt the user to locate the data using a form and a GetFile("Database:DBC") prompt. I then use the JustPath(JustPath()) function [yes twice] to just return the path part to the folder just above the Data folder. I then store that value in a user table in the application installation folder.