PC Review


Reply
Thread Tools Rate Thread

Access, VBA, Date Modified

 
 
Greg T
Guest
Posts: n/a
 
      11th Aug 2008
Hi, fairly new to the VBA world. I', trying to grab the Date Modified of a
table, how would I do this in VBA? I'm going to put this in a If statement.
If the table is over 7 days old than update data.

 
Reply With Quote
 
 
 
 
Michel Walsh
Guest
Posts: n/a
 
      11th Aug 2008
? CurrentDb.TableDefs("abc").Properties("LastUpdated")


as example.



Vanderghast, Access MVP



"Greg T" <(E-Mail Removed)> wrote in message
news:2819B011-46AB-4AD9-9000-(E-Mail Removed)...
> Hi, fairly new to the VBA world. I', trying to grab the Date Modified of
> a
> table, how would I do this in VBA? I'm going to put this in a If
> statement.
> If the table is over 7 days old than update data.
>



 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      12th Aug 2008
"Michel Walsh" <vanderghast@VirusAreFunnierThanSpam> replied in message
news:eNwgxZ$%(E-Mail Removed)...
>> Hi, fairly new to the VBA world. I', trying to grab the Date Modified
>> of a table, how would I do this in VBA? I'm going to put this in a If
>> statement. If the table is over 7 days old than update data.

>
>? CurrentDb.TableDefs("abc").Properties("LastUpdated")


Greg, Michel has answered your question, but I'm hoping you are clear that
this will tell you the date of the last design change, not when the data was
changed last.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

 
Reply With Quote
 
JvC
Guest
Posts: n/a
 
      12th Aug 2008
Add a field named DateModified to the table, Data Type of Date/Time,
Default Value of Now(). When records are inserted, the value is set to
the current date time. When you do updates, you need to update the
value to Now().

Good luck!

John

Greg T brought next idea :
> Hi, fairly new to the VBA world. I', trying to grab the Date Modified of a
> table, how would I do this in VBA? I'm going to put this in a If statement.
> If the table is over 7 days old than update data.



 
Reply With Quote
 
 
 
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last modified Date for an Access file Jess Microsoft Access VBA Modules 4 5th Feb 2010 02:52 PM
Access Database Modified Date Laura S Microsoft Access 2 17th Mar 2008 11:05 PM
how can I program in MS Access to get the last modified date of a. =?Utf-8?B?QnVydA==?= Microsoft Access VBA Modules 2 17th Oct 2007 07:11 AM
Can I access date created and date modified for Contacts =?Utf-8?B?cmpiYXJuaGFydA==?= Microsoft Outlook Contacts 1 6th Aug 2007 01:09 PM
About the modified date/time of Access Jing Microsoft Access 2 18th Nov 2003 07:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:42 PM.