Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2006, 03:15 PM
Authorized User
 
Join Date: Oct 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve Date/Time From Network Server

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!
 
Old February 17th, 2006, 08:50 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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/de...scriptinga.asp for script help. 99.99% of the time the script can be directly imported into Access and run from there.

HTH


mmcdonal
 
Old February 20th, 2006, 11:35 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old February 21st, 2006, 08:56 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Real time data from network Nuwang .NET Framework 2.0 1 May 13th, 2008 04:34 PM
Server Date & Time RICHBIRD Beginning VB 6 3 November 15th, 2007 08:59 AM
retrieve from Access by Date Toran Classic ASP Databases 2 May 4th, 2005 12:53 AM
How to retrieve multiple values at run time using anshul21 Crystal Reports 1 May 31st, 2004 10:36 PM
How do I change the Server Date and Time happygv SQL Server 2000 4 January 5th, 2004 11:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.