Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-03-2019, 10:57 AM   #1
Turps
Newly Registered User
 
Join Date: Jul 2019
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Turps is on a distinguished road
Requery Second of Two Subforms

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.

Turps is offline   Reply With Quote
Old 12-03-2019, 11:03 AM   #2
theDBguy
I’m here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,486
Thanks: 58
Thanked 1,419 Times in 1,400 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Requery Second of Two Subforms

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.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 12-03-2019, 12:55 PM   #3
Turps
Newly Registered User
 
Join Date: Jul 2019
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Turps is on a distinguished road
Re: Requery Second of Two Subforms

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.

Turps is offline   Reply With Quote
Old 12-03-2019, 01:00 PM   #4
theDBguy
I’m here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,486
Thanks: 58
Thanked 1,419 Times in 1,400 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Requery Second of Two Subforms

Quote:
Originally Posted by Turps View Post
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.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh/Requery Subforms Shallo9 Forms 1 03-01-2012 02:11 AM
Requery ALL Subforms? paindivine Forms 2 07-17-2007 02:00 AM
Requery All the Subforms in 1 command? SteveClarkson Forms 7 01-03-2005 02:16 PM
Issue with Requery of Subforms e2cheng Forms 5 01-10-2003 06:32 AM
Requery recordset of subforms DS Forms 2 03-02-2001 06:19 AM




All times are GMT -8. The time now is 05:32 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World