HiTechCoach
Well-known member
- Local time
- Today, 06:36
- Joined
- Mar 6, 2006
- Messages
- 4,353
Ok sorted my problems over the weekend. I am now looking to add a second renewal date. In the same table is a renewal date for another item, at the moment this popup is in a seperate form however combining them into the same form is fine.
How would I get the popup to check for the renewal date of "VDU Renewal Date" as well as "Card Expiration Date"
The code looks like this at the moment
Code:Private Sub Form_Load() 'On Load of the switchboard check Jobs table for any uncompleted jobs Dim intStore As Integer 'Count of uncomplete jobs that are past the Expected Completion Date intStore = DCount("[Employee Number]", "[contacts]", "[Card Expiration Date] Between #" & Date - 7 & "# And #" & Date + 3 & "#") 'If count of uncomplete jobs is zero display switchboard 'Else display message box detailing amount of jobs 'and give the user the option as to whether to view these or not. If intStore = 0 Then Exit Sub Else If MsgBox("There are " & intStore & " records due for renewal " & _ vbCrLf & vbCrLf & "Would you like to see these now?", _ vbYesNo, "You Have records due for renewal...") = vbYes Then DoCmd.Minimize DoCmd.OpenForm "renewal", acNormal Else Exit Sub End If End If End Sub
Try something like this:
intStore = DCount("[Employee Number]", "[contacts]", "[Card Expiration Date] Between #" & Date - 7 & "# And #" & Date + 3 & "# or [VDU Renewal Date] Between #" & Date - 7 & "# And #" & Date + 3 & "#")