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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Code to take me to a NEW record in a form with a subform!

Status
Not open for further replies.

jimtmelb1

Technical User
Sep 7, 2003
72
AU
Hi,

I have an Access 2000 database.
In one form i have a subform. Along the top of the form i have a NEW button. What i need is some code so when the user clicks this NEW button it takes me to a new record in the SUBFORM.

Thanks in advance.

Jim
 
Take a look at the DoCmd.GoToRecord method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for that. I have tried.

I know how to do it when you have just a form, but the subform is making it more difficult for me.

Anyone have any ideas?

Thanks
Jim
 

DoCmd.GoToRecord acDataForm, "theNameofyoursubform", acNewRec

You must have the form open for it to work. Since its a subform I assume it will be open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top