I'm have a form displaying records from a table holding details of events.
I'm using DFirst and DLast to work out what is the First and Last date.
I have the following code which simply writes this information on a message box after updating the field "Event Date"
Expand|Select|Wrap|Line Numbers
- Private Sub EventDate_AfterUpdate()
- MsgBox ("First Date = " & DFirst("EventDate", "TBBookedEvents") & _
- vbNewLine & "Last Date = " & DLast("EventDate", "TBBookedEvents"))
- End Sub
So if i have the first date as 01/02/11 and then change this to 02/02/11 the message box shows 01/02/11. but then if i change the first date again this time to 03/02/11 the message box shows the 02/02/11.
Strange things a happening, any idea what i need to change to get this to work properly. Any suggestions welcome.
P.S. tried using DMin and DMax instead but had the same issue.