Dear all,
I have designed a form with a sub form. User has to first save data in the main form, then an auto number ID will be assign to the row in the subform. Double clicking a field in the row of the subform will open a relevant pop up form with the linked ID.
How to stop this pop up form from launching if the linked value is null? Like the user has forgotten to save the data entry in the main form first.
At the moment, I can only disabled all buttons except back to main button with a reminder to save data first.
I tried this code below but it closes my main form instead of the blank sub form.
If IsNull(Me!txtBookId) Then
MsgBox " Please save Order entry first.",
DoCmd.Close
Thanks in advance for any help.
I have designed a form with a sub form. User has to first save data in the main form, then an auto number ID will be assign to the row in the subform. Double clicking a field in the row of the subform will open a relevant pop up form with the linked ID.
How to stop this pop up form from launching if the linked value is null? Like the user has forgotten to save the data entry in the main form first.
At the moment, I can only disabled all buttons except back to main button with a reminder to save data first.
I tried this code below but it closes my main form instead of the blank sub form.
If IsNull(Me!txtBookId) Then
MsgBox " Please save Order entry first.",
DoCmd.Close
Thanks in advance for any help.