Go to Control

E

Emmy

I'm trying to go to a control named PrintSARAProofSheets on exit of
SARADateReceived. I keep getting the message "Argument not optional." This is
what I have:

Private Sub SARADateReceived_Exit(Cancel As Integer)
DoCmd.GoToControl , PrintSARAProofSheets
End Sub

Thanks,
Emmy
 
F

fredg

I'm trying to go to a control named PrintSARAProofSheets on exit of
SARADateReceived. I keep getting the message "Argument not optional." This is
what I have:

Private Sub SARADateReceived_Exit(Cancel As Integer)
DoCmd.GoToControl , PrintSARAProofSheets
End Sub

Thanks,
Emmy

You incorrectly wrote the command.
Try:
DoCmd.GoToControl "PrintSARAProofSheets"
 
F

fredg

I tried it and it still doesn't work. Do I need additional code before the
DoCmd?

It works fine for me.
Are you sure your "PrintSARAProofSheets" can receive focus, i.e. it's
not locked or disabled? Also that that is the name of the control, not
just the name of a field in the a control's control source? And that
it is a control in the same form, not a control in a sub-form?
 
Top