I'm very experienced in access.
I'm having some serious issues with the .setfocus and docmd.gotocontrol methods.
Here's my code:
Private Sub OperatorID_AfterUpdate()
'Operator.OperatorID
If DCount("OperatorID", "tbloperator", "OperatorID = " & "'" & Me.OperatorID & "'" = 0 Then
MsgBox ("This is not a valid Operator ID!"
'DoCmd.GoToControl ("OperatorID"
'Me.OperatorID.SetFocus
Forms!Operator!OperatorID.SetFocus
Me.OperatorID = ""
End If
End Sub
it's acting as if the setfocus or docmd's aren't even there. As you can see i've tried it 3 different ways (2 of them are commented out) and it doesn't work at all.
Randall Vollen
National City Bank Corp.
Just because you have an answer - doesn't mean it's the best answer.
I'm having some serious issues with the .setfocus and docmd.gotocontrol methods.
Here's my code:
Private Sub OperatorID_AfterUpdate()
'Operator.OperatorID
If DCount("OperatorID", "tbloperator", "OperatorID = " & "'" & Me.OperatorID & "'" = 0 Then
MsgBox ("This is not a valid Operator ID!"
'DoCmd.GoToControl ("OperatorID"
'Me.OperatorID.SetFocus
Forms!Operator!OperatorID.SetFocus
Me.OperatorID = ""
End If
End Sub
it's acting as if the setfocus or docmd's aren't even there. As you can see i've tried it 3 different ways (2 of them are commented out) and it doesn't work at all.
Randall Vollen
National City Bank Corp.
Just because you have an answer - doesn't mean it's the best answer.