C
Crystal via AccessMonster.com
Hi,
This is hard to describe, but here goes.
I have several archive tables and queries. They are set up as follows:
On open: Date_Range appends to Archive_DR if ENDATE (ending date) is <Date()
Items appends to Archive_Items (Table inner joined with a
Select version of the above query)
Items deletes from Items where the above is true
Date_Range deletes where ENDATE <Date()
I also have my tables updating when the database loads. This occurs first,
then the archive immediately runs to grab any outdated information. The
update looks at my Items table to see when the Item was entered (can have the
same item multiple times). It takes the minimum date for each Item and uses
that as my start date. My end date is figured by adding 60 days to the start
date. The same items will not always be used from period to period, nor are
the periods the same. When the end date is reached, it is archived. A new
date should not be calculated until the item appears in the Items table again.
My problem is that sometimes this works and sometimes it doesn't. For
instance, one item has an archived date range of 2/1 thru 4/2. The current
or new date range is 3/31 thru 5/30. I checked the Items table, but that
item is not listed. All the occurences have been successfully deleted and
archived into Archive_Items. I've noticed that the new date range on these
incorrect items is always the last date the item appeared. I cannot find any
other pattern as to why this may be happening. I cannot have any dates that
overlap. Please help!
Thanks,
Crystal
This is hard to describe, but here goes.
I have several archive tables and queries. They are set up as follows:
On open: Date_Range appends to Archive_DR if ENDATE (ending date) is <Date()
Items appends to Archive_Items (Table inner joined with a
Select version of the above query)
Items deletes from Items where the above is true
Date_Range deletes where ENDATE <Date()
I also have my tables updating when the database loads. This occurs first,
then the archive immediately runs to grab any outdated information. The
update looks at my Items table to see when the Item was entered (can have the
same item multiple times). It takes the minimum date for each Item and uses
that as my start date. My end date is figured by adding 60 days to the start
date. The same items will not always be used from period to period, nor are
the periods the same. When the end date is reached, it is archived. A new
date should not be calculated until the item appears in the Items table again.
My problem is that sometimes this works and sometimes it doesn't. For
instance, one item has an archived date range of 2/1 thru 4/2. The current
or new date range is 3/31 thru 5/30. I checked the Items table, but that
item is not listed. All the occurences have been successfully deleted and
archived into Archive_Items. I've noticed that the new date range on these
incorrect items is always the last date the item appeared. I cannot find any
other pattern as to why this may be happening. I cannot have any dates that
overlap. Please help!
Thanks,
Crystal