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

Add Rec in FormA from FormB 1

Status
Not open for further replies.

6kleg

IS-IT--Management
Dec 21, 2004
24
US
My FormA is a continuous form for records in a Table1. Not all fields are shown. FormB is a Single Form view of the same table, with all fields displayed.

I want the user to be able to click a button in FormA to add a record, but I don't want the record added in the COntinuous form. I want to open FormB and set off FormB's AddRecord command button's click event which will force the user to enter all required fields.

The FormB button code in a Private Sub procedure is simply
Code:
DoCmd.GoToRecord , , acNewRec

A button click in FormA opens FormB. How can I call the FormB AddRecord button's click event while still in the FormA procedure?

Thanks for any help.
 
Take a look at the 5th argument of the DoCmd.OpenForm method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV,

That's just what I needed. Thanks. And have a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top