How to Reference Active Record on Subform (1 Viewer)

bconner

Registered User.
Local time
Yesterday, 23:21
Joined
Dec 22, 2008
Messages
183
I am trying to reference the fields on the active record in a subform. What I would like to do is have the user select a row on a subform (Datasheet View) and have a drill thru query generated. How can I pass fields from the active record in a subform to a query using VBA? Any help is appreciated...
 

pr2-eugin

Super Moderator
Local time
Today, 05:21
Joined
Nov 30, 2011
Messages
8,494
A bit unclear of what you want to pass??? But I think it would be the same as refering to a Form Control in a Query.. Use the expression builder to properly get the control route..
 

bconner

Registered User.
Local time
Yesterday, 23:21
Joined
Dec 22, 2008
Messages
183
I want to pass a couple field values from the selected recordset thru to the query. Because the subform contains multiple records in datasheet view I only want to pass the field values for the selected recordset (active) from the subform.
 

pr2-eugin

Super Moderator
Local time
Today, 05:21
Joined
Nov 30, 2011
Messages
8,494
So what is the logical flow of this Query to open?
 

bconner

Registered User.
Local time
Yesterday, 23:21
Joined
Dec 22, 2008
Messages
183
Yes, once the user selects the recordset row on the subform I want a query to be triggered and opened. The parameters for that query will be some field(s) from the selected recordset from the subform.
 

Users who are viewing this thread

Top Bottom