NextRecordBtn setFocus

rrmangus

New member
Local time
Today, 06:46
Joined
Jul 23, 2002
Messages
9
I am having a problem with a form I created that I'm sure has a simple solution. I put a command button in my form to insert a new record or go to the next record in my DB. Unfortunately, when the blank record appears the focus stays on the "next" button and I want it to go to the first tab stop in the next record of the form.

I inserted the following code, but now I am getting a compile time error:

DoCmd.GoToRecord , , acNext
Forms!frmPtDenials!ACCT#.SetFocus

Thanks for any help you can give.
 
Why don't you use GoToControl instead?

DoCmd.GoToRecord , , acNext
DoCmd.GoToRecord "[ACCT#]"
 
GoToControl worked perfectly!

Thanks so much.
 

Users who are viewing this thread

Back
Top Bottom