After OK, to jump to text box

A

an

Hi!

In main form I have a combobox to choose an option.
After choose, open a 2nd form with a message to alert for the obligatoriness
of fulfilling of NAI field (in unbound text box).

That 2nd alert form has o command button to OK.

I would like:
After click in that button (OK of the alert 2nd form), the cursor jumped for
the NAI field in main form. ( In this case is unbound textbox witn control
txtNAI )

In procedures of the OK button I have a code

Private Sub cmdOK_Click()

Dim txtNAI As Control

Set txtNAI = Forms!F_EntrData!txtNAI
DoCmd.GoToControl txtNAI

intMsgBox = vbOK
DoCmd.Close
End Sub

Don't work.
I would like your help, please.

Thanks in advance.
an
 

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

Top