VBA to prevent empty fields in a user-entry form
问题 I am having trouble with VBA coding which I am using to check for blank fields in a pop-up form. The code is supposed to check for blank fields on the form, notify the user if there are blank forms, and if there isn't, add the record. I have a second function which saves the record, then closes the form. Below is the code I am using to check for blanks: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim ctrl As Control Dim strMsg As String For Each ctrl In Me.Controls If ctrl.Tag = "BlkChk"