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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any good with macros?

Status
Not open for further replies.

louize

Technical User
Apr 22, 2001
24
0
0
GB
needs some cool macros to beef up my little database? know any good ones
 
Louize,

Why not just add two fields to your current table, the first of Yes\No type called Deleted that defaults to No and the second of date type called DateDeleted that defaults to NULL.

Instead of allowing users to delete records, just change the Deleted to Yes, and fill in the DateDeleted with the Date() function. You would have to change your queries and reports to only pull from the undeleted data (add to your WHERE clause (and Deleted = "NO"). You would also want to create a Delete Query that would go through and purge records where Deleted = Yes. I would suggest that be part of your Autoexec macro or performed on startup, but also suggest you only purge Deleted records that are over XX number of days old, like 30.

Remember, you must compact the database before any records, even deleted ones are officially removed.

Hope that is a start... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
ahhh very very clever idea terry, thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top