Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code - depending at home or the Office

Status
Not open for further replies.

darinmc

Technical User
Feb 27, 2005
171
GB
Hi
I have these 2 strings of code below
When i'm working on the design at home, I use the 1st line and
when at work the 2nd...

Code:
'stPathA = "C:\Lynx\EmpPhotos\" & Me.EmpRegNo & ".jpg"
stPathA = "\\Lynxserver\lynx\EmpPhotos\" & Me.EmpRegNo & ".jpg"

Is there an easish way to change this in an ADMIN form WITHOUT having to go into the code all the time??

Thx
Darin
 
You can probably use the computer name to check where you are, or if this is not permitted by security, you can use a global variable.

If Environ("ComputerName")="WorkName" Then ...

Or
If gvarWork=True Then ...

If this is used to link tables, the best bet is to maintain a table of tables and use this to check the connect property of each table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top