Requery Second of Two Subforms (1 Viewer)

Turps

New member
Local time
Today, 11:08
Joined
Jul 3, 2019
Messages
6
Requery Second of Two subforms

I have an issue with a form with subforms that I have created. The main form contains two subforms. Both subforms are formatted as continuous forms.
The database was made to log events and the status of those events.
The first subform is called Primary_Log_SF. This subform record source is a query called Primary_Log_Q. There are two query criteria called Log_Type_ID and Status_ID in the main form.
The first subform is updated by way of the main form combo box selection of available Log_Type_ID and Status_ID. The first subform updates as required and based on the combo box selection in the main form.
The second subform is called Status_Update_SF and is meant provide status updates on the first subform entries. One creates status updates to the first subform entry and so there could be multiple status updates for each entry in the first subform.
The Status_Update_SF record source is a query called Status_Update_Q. The query criteria is a text box in the main form. That text box has a Control Source =[Primary_Log_SF].[Form]![Primary_Log_ID]
When I select a record in the Primary_Log_SF, it should update the Status_Update_SF to the selected Primary_Log_ID, but this does not happen.
I have tried setting events after update of the text box “Me.Refresh”, “Me.Requery”, “Me.Status_Update_SF.Requery” and others.
I have tried stetting events “on click” of the text box Me.Refresh”, “Me.Requery”, “Me.Status_Update_SF.Requery” and this actually updates the subform, but I don’t want to click the text box every time.

Your help would be greatly appreciated.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:08
Joined
Oct 29, 2018
Messages
21,358
Hi. Welcome to AWF!


No events or code should be needed. You should be able to link the second subform to the criteria textbox on the main form that reference the first subform. Go to design view of the main form and select the second subform and set the Linked Master and Child Fields to use the main form Textbox as the Master field and the Foreign Key field in the second subform as the Child field.
 

Turps

New member
Local time
Today, 11:08
Joined
Jul 3, 2019
Messages
6
Thanks so much for your help.
I had tried this before; however I the text box was named "text 7"
I changed the name to the correct name associated with the parent and BAM! IT WORKS.
Thanks again. I spent so much time trying to figure this out.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:08
Joined
Oct 29, 2018
Messages
21,358
Thanks so much for your help.
I had tried this before; however I the text box was named "text 7"
I changed the name to the correct name associated with the parent and BAM! IT WORKS.
Thanks again. I spent so much time trying to figure this out.
Hi. You're very welcome. We're happy to help. Good luck with your project.
 

Users who are viewing this thread

Top Bottom