"Does anybody know how to figure out which required field was left blank so that I can position the cursor in it?"
Maybe you could use the Tag property, and when you loop through the controls, if the Tag has a specific entry then
you know it's required, then you test if they plugged in anything. Of course, you would have to load in the Tag
values, but only once.
I usually do all of my required fields in code, not in the table. In this way, I can require certain fields for
certain users. For example, my manufacturing job tickets are started by the receiving clerk, but they don't know
all the info, so they're allowed to skip some of the fields. However, when the customer service rep gets the job
ticket, they do need to complete all of the fields, and they can't leave that screen until they're done.
I use something like this:
With Me
If IsNull(.fldOne) Or IsNull(.fldTwo) Or IsNull(.fldThree) Then
resp = MsgBox("all fields are required",vbOKOnly+vbExclamation)
If IsNull(.fldOne) Then
DoCmd.GoToControl "fldOne"
ElseIf IsNull(.fldTwo) Then
DoCmd.GoToControl "fldTwo"
Else
DoCmd.GoToControl "fldThree"
EndIf
Exit Sub
Else
DoCmd.Close
End With