indesisiv
Access - What's that?
- Local time
- Today, 15:40
- Joined
- Jun 13, 2002
- Messages
- 265
Hi all,
I am trying to get my database to do an archive ... the actual archive bit of the database works fine so no probs there. The problems begins when i am trying to tell the user what is happening.
i have this code.
the date add function seems to work fine and bring up the correct date. But when i use that date in the dcount it brings up the wrong number of records.
Does anyone have any idea if there is something obviously wrong with this.
Thanks in advance
Steve
I am trying to get my database to do an archive ... the actual archive bit of the database works fine so no probs there. The problems begins when i am trying to tell the user what is happening.
i have this code.
Code:
Dim DateForArchive As Date
Dim NumberForArchive As Integer
DateForArchive = DateAdd("ww", -10, Date)
NumberForArchive = DCount("[VenueID]", "[tblVenue]", "[Venuedate] < #" & DateForArchive & "#")
If NumberForArchive > 0 Then
If MsgBox("There are " & NumberForArchive & " records to be archived!" & vbCrLf & vbCrLf & "Would you like to archive them now?", vbYesNo) = vbYes Then
'Archive
the date add function seems to work fine and bring up the correct date. But when i use that date in the dcount it brings up the wrong number of records.
Does anyone have any idea if there is something obviously wrong with this.
Thanks in advance
Steve