Jonny45wakey
Member
- Local time
- Today, 04:19
- Joined
- May 4, 2020
- Messages
- 48
Hi
I have a form "frmDayshift" with a cmd button (Command28) and on the on click event it opens a popup form "frmDayshiftprintchecks" and looks for a matching record by date.
This works fine if there is a matching record but if there isnt, I'd like a message box to notify the user and then close the form but i cant seem to find the right vba.
Would it be better to validate the record on form before update?
Here is my code behind Cmd28
DoCmd.OpenForm "frmDayShiftPrintcheck", , , "[CheckDate]=#" & Me.ShiftDate & "#"
Any support greatly appreciated
Jonny
I have a form "frmDayshift" with a cmd button (Command28) and on the on click event it opens a popup form "frmDayshiftprintchecks" and looks for a matching record by date.
This works fine if there is a matching record but if there isnt, I'd like a message box to notify the user and then close the form but i cant seem to find the right vba.
Would it be better to validate the record on form before update?
Here is my code behind Cmd28
DoCmd.OpenForm "frmDayShiftPrintcheck", , , "[CheckDate]=#" & Me.ShiftDate & "#"
Any support greatly appreciated
Jonny