Go To New Record on Subform

K

Kirk P.

I have a Form (frmCustomers) that contains a subform (sfrmRevenue). When
frmCustomers is opened, I want the curser to jump to a new record in
sfrmRevenue. I believe my code is correct, maybe I'm just not using the
correct event.

DoCmd.GoToRecord acForm, "sfrmRevenue", acNewRec

Help?
 
T

T Best

Hi Kirk, you need to setfocus to the subform first.

Me![sfrmRevenue].Setfocus
DoCmd.GoToRecord , , acNewRec

hope that helps
Ted
 
K

Kirk P.

Perfect. Thanks!

T Best said:
Hi Kirk, you need to setfocus to the subform first.

Me![sfrmRevenue].Setfocus
DoCmd.GoToRecord , , acNewRec

hope that helps
Ted



Kirk P. said:
I have a Form (frmCustomers) that contains a subform (sfrmRevenue). When
frmCustomers is opened, I want the curser to jump to a new record in
sfrmRevenue. I believe my code is correct, maybe I'm just not using the
correct event.

DoCmd.GoToRecord acForm, "sfrmRevenue", acNewRec

Help?
 
T

T Best

Anytime...glad that helped

Kirk P. said:
Perfect. Thanks!

T Best said:
Hi Kirk, you need to setfocus to the subform first.

Me![sfrmRevenue].Setfocus
DoCmd.GoToRecord , , acNewRec

hope that helps
Ted



Kirk P. said:
I have a Form (frmCustomers) that contains a subform (sfrmRevenue). When
frmCustomers is opened, I want the curser to jump to a new record in
sfrmRevenue. I believe my code is correct, maybe I'm just not using the
correct event.

DoCmd.GoToRecord acForm, "sfrmRevenue", acNewRec

Help?
 

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