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!

Creating new record in subform

Status
Not open for further replies.

BaudKarma

Programmer
Feb 11, 2005
194
US
I've got a form with a linked subform. The subform displays continuous records. I have code in the main form that looks up data in an external table with dlookup, then adds it to the subform with:

Forms![frm1].Form![subfrm1]![Field1] = txt1

Which works just fine until it's time to add another record. I don't know how to code commands to tell the subform to add a new record, so I'm just overwriting the existing data. Any advice on a better way to handle this?



I try not to let my ignorance prevent me from offering a strong opinion.
 
How are ya BaudKarma . . . . .

I query your form referencing!

Try this:
Code:
[blue]   Me![purple][b]YourSubformName[/b][/purple].SetFocus
   DoCmd.RunCommand acCmdRecordsGoToNew
   'Your assignments here[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top