Pass data from Access subform to another form

5 pts.
Tags:
Access form controls
Access Forms Database
Microsoft Access
Microsoft Access forms
Microsoft Access subforms
In Access - How do I select or pass data from a subform to another form? I can pass the data back to the main form, but I want to pass to the subform data to another form

Software/Hardware used:
Access

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you are using the OpenForm method, you could use the openargs parameter to pass data to the opened form. You would reference it in the other form with Me.OpenArgs.
This works best with just one piece of data to be passed; if you need more than one piece of data, you could separate them with a dilimiter and then parse it out of Me.OpenArgs. Or if it is multiple fixed width pieces of data, you could use the mid function to parse it.

Another way of doing it is referencing the field from the called form like this:

variable = Forms![MasterFormName].Form![SubForm]![ColumnName]

MasterFormName is the name of your master form
SubForm is the name of the subform object in the master form
ColumnName is the name of the column in the subform object

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following