How to read the Computer Name in System Properties from Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Within Microsoft Access (97) I want to be able to read the 'Computer Name' in
basic coding of the computer that is currently being used. The 'Computer
Name' tab is listed under the 'System Properties' window but I do not know
how to reference it. Thanks.
 
Try using;

environ$("computername")

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Within Microsoft Access (97) I want to be able to read the 'Computer Name'
in
| basic coding of the computer that is currently being used. The 'Computer
| Name' tab is listed under the 'System Properties' window but I do not know
| how to reference it. Thanks.
 
You're welcome.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Brilliant - thanks Dave
|
| "Pootle" wrote:
|
| > Within Microsoft Access (97) I want to be able to read the 'Computer
Name' in
| > basic coding of the computer that is currently being used. The 'Computer
| > Name' tab is listed under the 'System Properties' window but I do not
know
| > how to reference it. Thanks.
 
Be aware, though, that environment variables are trivial to reset. If you
want to be absolutely sure that you're getting the correct value, you really
should use the GetComputerName API. See
http://www.mvps.org/access/api/api0009.htm at "The Access Web" for a
complete example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top