Open new record with filled fields

setis

Registered User.
Local time
Today, 15:03
Joined
Sep 30, 2017
Messages
127
Dear all,

Could someone help me to write the VBA for a button in a form (form A) that contains:
[MemberID] and other fields,

that opens a formB with the MemberID=MemberID (of formA) filled in?

Thank you in advance
 
You can refer to another forms controls from an open form using the syntax - Forms!YourFormName!YourControlName.
See here http://access.mvps.org/access/forms/frm0031.htm for more examples

So on Form B's load event you could use

Me.MemberID = Forms!FormA!MemberID

You would be best checking the Form A is open and has a current record before adopting that approach.

Or you could use the OpenArgs property to either do some looks ups, or open a recordset and set values from that.

Like most things in Access there are many ways to skin a cat.
 
Guys, I think that I need to take a step back and ask for some advice on how to set this up.

I have a list of members that will have claims. Under every claim can be one or more invoices.

What would be the right way to do this?
What I am thinking is either
*A subform on the claim form with the invoices details
or
*A button to launch an invoice form that is linked (without user input) to the claim where it's launched from
 

Users who are viewing this thread

Back
Top Bottom