On my form, when I move to a new record, the "RecNum" field is populated with the data from the previous record. The problem is that it only works if the "Recnum" field receives the focus.
I want the focus to move to the RecNum field to trigger its "On Focus" event when the user clicks the date field. I have a "On focus" event for the date field to do this. However, I receive the message that the focus cannot be moved to the "RecNum" field. I was hoping there was another way of triggering the RecNum event.
Private Sub RecNum_GotFocus()
SendKeys "^'", True
ServPro.SetFocus
If IsNull(ServPro) Then SendKeys "^'", True
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToControl "doe"
End Sub
Private Sub DOE_GotFocus()
If IsNull([RecNum]) Or IsNull([ServPro]) Then
RecNum.SetFocus
End If
End Sub