"Jonathan" <Jonat...@discussions.microsoft.com> wrote
> I am writing an Access database (Access 2003 on WinXP and VISTA) in VBA and I
> would like to be able to read out the computer name of the PC the database is
> going to be running on.
> Is there a way to do this?
One easy way is to use enviroment settings. For a complete list try this:
For i = 1 To 50
Debug.Print i, Environ(i)
Next
Specifically, for the computer name, try this:
MsgBox Environ("COMPUTERNAME")
Just be aware that these settings can be changed by the user, but for the most
part, are usually accurate....
HTH
LFS