Subform Link to Unbound Field

Moish

New member
Local time
Yesterday, 23:18
Joined
Aug 3, 2008
Messages
1
I have a form that does not have any bound fields. I want to open a subform on that form to a specific record based on the value of an unbound field on the main form. Obviously the subform is not linked to the main form by master/child fields.

I have done some tests. If I add a field to subform whose data source is the field from the main form that I am trying to link the subform with it does display the right information. If I open the main form and then open the subform as a main form then the filter works and it displays the right record.

Any ideas?
 
Moish,

Base your subform on a query. To get the appropriate data in the subform, put this
in the Criteria for the appropriate field in your query:

Forms!YourMainForm!YourUnboundField

You'll have to substitute in for YourMainForm and YourUnboundField

You can use the AfterUpdate event of the unbound textbox:

Me.YourSubform.Requery

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom