Subject: Retrieve Date/Time From Network Server
Posted By: wscheiman Post Date: 2/16/2006 2:15:47 PM
Hi Everyone,

Does anyone know a VBA or API function that I can use to retrieve
the system date and time from a network server (rather than the
local workstation), as long as the user is logged onto a network?

Any help would be SUPER-appreciated!

Thank You!
Reply By: mmcdonal Reply Date: 2/17/2006 7:50:57 AM
I think I know what you are trying to do this for. I do this for a time system and compare the local machine time with the server time. But I have upsized the back end to SQL and use the SQL GETDATE() function as the default value of the field. I used this because I couldn't find a scripting solution (VBA = VBScript = VB.Net, practically.) Hang on and let me look again...

Nope. Nothing in Windows 200 Scripting guide by MS Press. See the MS Scripting Center at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/scriptinga.asp for script help. 99.99% of the time the script can be directly imported into Access and run from there.

HTH


mmcdonal
Reply By: kindler Reply Date: 2/20/2006 10:35:53 AM
I think your best bet would be to have Windows time be synchronized with the network server, then use the system time for Access.  I do not believe Access has the functionality to directly access a server time.

Reply By: mmcdonal Reply Date: 2/21/2006 7:56:04 AM
Yeah, the issue I had with that, though is that the user can change the system time to whatever they want after they log in, and then access the database with their inaccurate system time. Then they can change it back.

I think synchronization with the server time only happens at log in. Once your logged in, you're free to change.



mmcdonal

Go to topic 40269

Return to index page 365
Return to index page 364
Return to index page 363
Return to index page 362
Return to index page 361
Return to index page 360
Return to index page 359
Return to index page 358
Return to index page 357
Return to index page 356