Retrieve Server Time In A form

A

attie

Hi

I would like to find out if there is a way to retrieve either the time of
the system a database with linked tables is saved on or just the time of a
server with an ip address i.e. 10.0.0.1 on an access form, if there is, How ?

Thanks
 
D

Douglas J Steele

As long as you're using NT or better, see whether
http://www.mvps.org/access/api/api0039.htm at "The Access Web" helps. It
won't work with an IP, mind you, but you should be able to retrieve the
server name using the code Randy Birch has at
http://vbnet.mvps.org/code/network/hostnamefromip.htm

(Obligatory warning: Randy's site is aimed at VB programmers. Because of the
differences between the controls available for forms in VB vs. Access, some
of his examples cannot simply be copied in Access. A brief look at this
example, though, looks as though it shouldn't cause any problems)
 
A

attie

I did look at that article prior to posting here, i have used the code, duno
if i'm being stupid, but I cannot get any response from it, i.e. displaying
the time in a textbox.
 
D

Douglas J Steele

How are you trying to use the code?

I just ran it in the Immediate window with no problems (WinXP, SP1, Access
97):

?fGetServerTime("\\wynoas31")
11/15/2005 03:17:27 PM
 

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

Top