Using Access 2016, I have a main form frmInvoice
which has a subform frmInvoiceDetail
. My main form is bound to a table with a Required field PaymentMethod
. However, the field is usually not populated until after the items on the invoice have been entered into the continuous subform. I want the required field validation to kick in when the user moves away from that invoice record or closes the form, but not when switching focus between the main form and subform.
I have tried removing the Required status on the field and running VBA code that checks the field is populated when the user closes the form or moves to another invoice using on-form controls, but there seems to be no way of running this code when the user moves to another invoice record using the navigation buttons.
Any ideas? Thanks for reading...