Go to Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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"
 
I tried it and it still doesn't work. Do I need additional code before the
DoCmd?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top