Solved Add record in formB from formA

NearImpossible

Registered User.
Local time
Today, 05:50
Joined
Jul 12, 2019
Messages
225
I have a main form with a tabctrl, and on tab 7 i have 2 forms that we will call formA and formB, both linked to the main form via facilityID

What I would like is to click a button in formA that will add a new record to formB.

When I try either of the following
Code:
Forms!formB.Form.Recordset.AddNew
or
Code:
Forms!FormB.SetFocus
DoCmd.GoToRecord , , acNewRec

I get the following "Run-time error '2450': Micorsoft Access cannot find the referenced form 'formB'

As these forms are on a tabctrl, i guess im not sure how to reference formB from formA.

please advise
 
it's always inside the Main form:

Forms!mainFormName!FormB.Form.Recordset.Addnew
 

Users who are viewing this thread

Back
Top Bottom