Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 10th, 2004, 07:12 AM
dtumacder dtumacder is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 dtumacder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
VBA coding for Access 2000

I know that this forum usually deals with SQL and Oracle but I need help with a simple Visual Basic for Access code. I have looked online up and down and I have not been able to find a VBA code for a Timestamp for Access 2000. I want the timestamp field in the form to automatically insert the current time/date when I first bring up the recorde then save the time stamp when I save the record. I have seen coding for access 2002 and 2003 but none for 2000. Thanks for the help.

Reply With Quote
  #2  
Old May 19th, 2004, 10:25 AM
dtumacder dtumacder is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 dtumacder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
can anyone help me?

Reply With Quote
  #3  
Old May 19th, 2004, 03:16 PM
donshields donshields is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 donshields User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
In the table design, set the default value for the field to "Now()" (minus quotes). This will ensure that all new records will have the current time stamp.
For updates in the form, use the following code in the OnDirty event:

Private Sub Form_Dirty(Cancel As Integer)
Me!FieldName.Value = Now()
End Sub

This will update the field whenever the record is updated.

I hope this helps.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > VBA coding for Access 2000


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 4 hosted by Hostway
Stay green...Green IT