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

Add new buttom

Status
Not open for further replies.

List

Technical User
Apr 22, 2004
5
PE
Hi, All,

I created "add new" buttom in the form that works in the main form. But It is not work in the sub form.

Any help?

Thank you a lot.

Joe
 
private sub cmdAddNewOnSubForm
DoCmd.GoToRecord acDataForm, _
Me.MySubForm.Form.Name, acNewRec
end sub

Aivars



 
Hi, LonnieJohnson,

I didn't set focus, but I have "autoNumber" text box.

Thanks again.
Joe
 
Hi, LonnieJohnson,

Yes, I have a child/Master links. My form status is:

Main form -> subform -> another subfrm, that means the main form including subform, subform including another subform.

All forms have child/master link. My form works fine for all search combox, but only "add new" buttom not work in subform.

Any more ideas.

Many Thanks.
Joe
 
Requery the subform after adding record on Main form. (Before you requery the subform you may save record on Main form)

Aivars
 
Thanks all. I already got it.

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top