Firstly new to this forum and after a long time of not using access I have decided to use the program for a customer database. I am currently creating tables and forms for different aspects of our business. Unfortunately I seem to be banging my head head against a wall on this one and I am hoping someone would be kind enough to help me out.
Here goes....
I have a table with a date field which is to remind us to contact the customer. What I am trying to do is to create a pop up based on a date within that table. I have managed to do this successfuly using the following VBA on a welcome form:-
Private Sub Form_Timer()
Dim ID As Long
ID = Nz(DLookup("RecordID", "IntruderInstallationT", "FollowupDate<=#" & Now & "#"), 0)
If ID <> 0 Then
DoCmd.OpenForm "NoticeF"
End If
End Sub
However I have a problem, if the date in the field is greater than 30 days the NoticeF displays without a hitch, but if the date is less than 30 days, nothing works it just sits there no error messages but as soon as I change the date back to more than 30 days prior the PC time it works again.
Sorry long winded I know, but thanks in advance.
Here goes....
I have a table with a date field which is to remind us to contact the customer. What I am trying to do is to create a pop up based on a date within that table. I have managed to do this successfuly using the following VBA on a welcome form:-
Private Sub Form_Timer()
Dim ID As Long
ID = Nz(DLookup("RecordID", "IntruderInstallationT", "FollowupDate<=#" & Now & "#"), 0)
If ID <> 0 Then
DoCmd.OpenForm "NoticeF"
End If
End Sub
However I have a problem, if the date in the field is greater than 30 days the NoticeF displays without a hitch, but if the date is less than 30 days, nothing works it just sits there no error messages but as soon as I change the date back to more than 30 days prior the PC time it works again.
Sorry long winded I know, but thanks in advance.