time diff to delete

murray83

Games Collector
Local time
Today, 18:24
Joined
Mar 31, 2017
Messages
827
have read http://allenbrowne.com/casu-13.html on how to calculate elapsed time, but i think i have got something wrong as this is my code

Code:
END: DateDiff("d",[ScanTime],[Due])

and in the where i have this

Code:
>=2

so if its greater or equal to 2 days old it should, in my head delete but, it dont.

help please if you can

file attached
 

Attachments

Can't help. Your database is inaccessible--can't get into design mode, can't F11
 
This isn't how databases work. You don't move data hither and yon--you use fields to designate its status.

The archive table should be your main table. When someone archives a record, simply record it in there, no need to move data from one table to another.
 
This isn't how databases work. You don't move data hither and yon--you use fields to designate its status.

The archive table should be your main table. When someone archives a record, simply record it in there, no need to move data from one table to another.

yes ok i understand but then the main table will end up with thousands of records
 
yes ok i understand but then the main table will end up with thousands of records

That's a statement of fact, not a counter argument. What is wrong with thousands of records?
 
That's a statement of fact, not a counter argument. What is wrong with thousands of records?

i guess nothing, as that's what databases are built to cope with, but was just thinking of a more clean look so only had data relevant to that week say on the main table

and after that its deleted from main and moved to archive table which isn't on a shown form and only accessed via password when and if needed so the data wouldn't be duplicated
 
That's what queries are for.
 

Users who are viewing this thread

Back
Top Bottom