Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2006, 03:15 PM
Authorized User
 
Join Date: Oct 2003
Location: Cleveland, OH, USA.
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!
Reply With Quote
  #2 (permalink)  
Old February 17th, 2006, 08:50 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old February 20th, 2006, 11:35 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: , , .
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.

Reply With Quote
  #4 (permalink)  
Old February 21st, 2006, 08:56 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:42 PM.


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