Good morning all,
I created a form with a subform. This is what I'm trying to do. There is a text box named Header, if I type in to call a specific header, the detail information would appear in the subform.
Please guide me how to do this
Thanks
I assume 'Header' is a textbox on the main form, thus do the following:
Create an 'AfterUpdate' event:
Private Sub Header_AfterUpdate()
Me.subformname.Requery
End Sub
Either set your subform recordsource to select records based on the 'Header' field, or use the 'Link Child' and 'Link Master' settings for the subform and link on field 'Header'.
Code: Where the vision is often rudely introduced to reality!
Thanks Trevil for your response!
I checked my subform properties. There are both Link Child and Link Master with field = Header_ID
The recordsource for the subform is in datasheet view.
Do I have set the properties correctly?
When you say 'The recordsource for the subform is in datasheet view', I believe the recordsource property for the subform is either a table name or a query name or a SQL string. Which is it? If a query or SQL, please show the SQL.
Code: Where the vision is often rudely introduced to reality!
I'm having the same issue as the person above. I have a main form and a subform. On the main form (frmHDA) I have a combo box to select the HDA. The in the sub form (sfrmHDAInformation) I have a query to pull the selected data, but it is pulling down any information. My parent/child is linked at the field "HDAs." The information for the combo box and the subform are coming from the same table. Could that be the issue? Below is the SQL I have on the subform:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.