Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

go to new record in subform using a macro

Status
Not open for further replies.

JSD

Technical User
Jan 18, 2002
189
US
Hello,

I was wondering if there is a way to go to a new record using a macro. I need this because I'm trying to use function keys to trigger commands instead of mouse click. I had this working in VB onclick of a button in the subform using DoCmd.GoToRecord , , acNew. This same command does not work in the macro. I think it is because I have to specify the form in the macro, but specifying the main form gives me no result and specifying the subform I get an error that says "frmwipin_plantone" is not open. Can anyone help me to work around this?

Thanks,

Jeremy

 
I think it will be worth to first create a action to set focus on the control and then run new rec macro. So your macro will have two actions

GotoControl "Your Subform Name"
GotoRecord ..etc

Hope it helps


Cheers!
ÙÇãá
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top