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

acNewRec in subForm

Status
Not open for further replies.

Pennmaker

Technical User
Oct 2, 2009
2
US
I am trying to clear controls in my subform. The Record Source for the subForm is a table (tblName), but I also have unbound controls on the subForm (Address and Telephone Info) After the user enters the name, address and telephone info, I use a command button the write data to tables. I use the tblName Primary Key which is on the subForm and add it to tblAddress and tblTelephone as a foreign key. I can clear the unbound controls using
me.subform.txUnboundControl=" " but I can't seem to clear the bound controls. My subForm properities data entry is set to yes. I have tried doCmd.GoToRecord, "subForm", acNewRec. I have tried setting the focus to the Main Form, then Sub Form, then doCmd.GoToRecord, "subForm", acNewRec
I either get compile error that the argument is not optional or the object isn't open.
Any help would be great.
 
Just save the record and DataEntry will automatically move you to a new record.
If Me.Dirty Then Me.Dirty = False

(RG for short) aka Allan Bunch MS Access MVP acXP ac07 winXP Pro
Please respond to this forum so all may benefit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top