Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Delete/Overwrite a Table based on its Creation Date using code 1

Status
Not open for further replies.

Binnit

Technical User
Apr 28, 2004
627
US
I would like to check the date a table was created using code so that it can be deleted or overwritten as required.

I imagine it would be something like:-

If MyTable.CreatedDate<=#01/07/06# then
Docmd.DeleteObject MyTable
Endif

Any guidance appreciated.







If IT ain’t working Binnit and Reboot
 
Why not simply use this property ?
CurrentDB.TableDefs("MyTable").DateCreated

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks MP9 & PHV for your replies, I have to agree that PHV's option is minimalist and produces the goods.

Always good to have an alternative though.

If IT ain’t working Binnit and Reboot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top