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!

Create a new record on parent form from subform

Status
Not open for further replies.

TKaminski

Programmer
Sep 5, 2001
27
US
When users are done entering new records on my subform I want the parent form to go to a new record. The subform has a command button that is in the tab order and the OnClick event that is failing is:

Forms!<mainform>.Form.GoToRecord <argument>

I tried to modeled this based on tread 181-56137 from Rick Spragues (RickSpr).

Any help would be great.
 


Reading the mind of users to guess when they are done adding new records in the subform seems a likely impossibility, so you will need some overt action on their part.Perhaps there is something I am missing, but why not use Access's handy-dandy command button wizard and place a command button on the main form to add a new record?

If only one record is being added in the subform, then you have a one to one relationship and there seems little point in using a subform.

Otherwise following the earlier thread, you will need to set focus back to the main form and then use DoCmd.GoToRecord , , acNewRec

Cheers, Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top