Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 24th, 2005, 09:10 AM
saabman saabman is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 68 saabman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 34 m 21 sec
Reputation Power: 5
Question how to get the computer name?

Hi
I am editing some VBA code in Access 2000 and I need to get the computer name. I know that with the shell command you can use
Code:
%computername%

But is there a function I can use directly in Access? I want to use this info in the body text of an automated e-mail sent by the users of my database like a signature so I can identify the message. Here is the code sample I would like to use and where I would like the computer name to appear:
Code:
strBody = strBody & vbCrLf & computername


Thanx for the helping hand

Reply With Quote
  #2  
Old August 24th, 2005, 12:37 PM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
ASP Free God 16th Plane (12500 - 12999 posts)
 
Join Date: Feb 2005
Location: Dreamland
Posts: 12,867 mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 4 Months 4 Weeks 15 h 21 m 57 sec
Reputation Power: 1762
Quote:
Originally Posted by saabman
Hi
I am editing some VBA code in Access 2000 and I need to get the computer name. I know that with the shell command you can use
Code:
%computername%

But is there a function I can use directly in Access? I want to use this info in the body text of an automated e-mail sent by the users of my database like a signature so I can identify the message. Here is the code sample I would like to use and where I would like the computer name to appear:
Code:
strBody = strBody & vbCrLf & computername

Thanx for the helping hand


Try using the following:
Code:
strBody = strBody & vbCrLf & Environ("computername")
Comments on this post
saabman agrees: Very helpful!
sheeba agrees: good
__________________
Come JOIN the party!!!

Quote of the Month:
Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use.

Questions to Ponder:
What do you do when you see an endangered animal eating an endangered plant?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright© 2008 sbenj69

Reply With Quote
  #3  
Old August 25th, 2005, 02:35 AM
saabman saabman is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 68 saabman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 34 m 21 sec
Reputation Power: 5
works great! Thanx for that!

Reply With Quote
  #4  
Old August 25th, 2005, 02:43 AM
sheeba's Avatar
sheeba sheeba is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jul 2005
Posts: 678 sheeba User rank is Corporal (100 - 500 Reputation Level)sheeba User rank is Corporal (100 - 500 Reputation Level)sheeba User rank is Corporal (100 - 500 Reputation Level)sheeba User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 8 m
Reputation Power: 5
Really good!!!!!!!!!!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > how to get the computer name?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT