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!

button to add record in subform 1

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I have a form which is not updatable. It has a subform which is updatable. I want to put buttons on the main form which will add a record in the subform. The view status of the subform is datasheet. There will be hundreds or thousands of records in the subform. I want the user to be able to jump to the right place to add a record by clicking a button in the main form.

I have tried a few things and come up with nothing. Can anyone tell me how to refer to acNewRec in the subform?

MrsBean
 
The main form provides context ... It displays the item information and a method for jumping to an item for which you want to adjust the inventory.

If the user wants to add an item to the catalogue, there is a button to add an item, and they're taken to the catalogue form.

The star of the show in this particular form is the subform. The subform on its own would be difficult at best to understand - not enough context.

MrsBean
 
Are they both related, or is it a locked form, nothing never gets changed in it?

If they are not related... can you at least add new records in the subform with a addnewrecord control?(placed in the subform)
 
How bout from the main form and a command button:

Private Sub cmdAdd_Click()

Me![Your Subform Name].SetFocus
DoCmd.RunCommand acCmdRecordsGoToNew

End Sub
 
I can add records in the subform. I want a button to help the user jump to the bottom of the subform and add a new record. There will be thousands of records in the inventory table (the one that is receiving the new record) once the database goes live.

MrsBean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top