I have a form with subforms on it (subforms are designed on tabcontrol and each has separate page)
After user enter information on form and tries to hit "Save" button i would like the access first to check if value in a subform field is not empty.
It is tblTakeOrder form. When user fills information on form with order id, client name and required date and try to save it - access needs to check SubForm "Order details" if orders price is typed in it
Trying to use this code but doesn't work:
After user enter information on form and tries to hit "Save" button i would like the access first to check if value in a subform field is not empty.
It is tblTakeOrder form. When user fills information on form with order id, client name and required date and try to save it - access needs to check SubForm "Order details" if orders price is typed in it
Trying to use this code but doesn't work:
Code:
Forms![TakeOrder]![Orderdetails subform].Form![Price].SetFocus
If Me!Orderdetails subform.Price Is Null Then
MsgBox "Please insert price of the order"
Else
DoCmd.RunCommand acCmdSaveRecord
End If
End Sub
Comment