Continuous Form Selection Filters Query

Donovansmth

New member
Local time
Today, 14:32
Joined
Jan 4, 2023
Messages
5
Good Evening,

I have a question if someone could assist me. I have 2 forms, a dashboard, and continuous form. I was to select a row on one form, and update the fields on the home page.

Currently the home page control source is a Query of all the items, am I able to set my selection in the continuous form to the query criteria item for the home page. Also can I create a function where anytime I want to select a row of data on any form, it refreshes the fields on the home page.

Thanks for any assistance
 
You do this in the docmd.openform to filter the open form to a selection
see the example for cmboFilter

There is lots of ways to requery the main form. I normally only have one form open at a time except if I open a pop up it is Modal.
One trick is to do it like so

Docmd.openform "yourPopupform",,,"[SomeFieldOnThePopUp] = " & me.[SomeID], ACDIALOG
me.requery

So you open the pop up form to a specific record. You use the windowmode ACDIALOG. That cause code execution in the calling form to stop until the popup is closed. When the popup closes code execution resumes and the calling form requeries.

If you forget the ACDIALOG it will not work. The requery would happen immediately after opening the pop up and before any changes could happen.
 
Last edited:
you can also Add a Timer Event on the Dashboard Form to Requery your records.
 
Thank You, that worked perfectly. Now there is a second value I also want to pass, but its to a sub-form on the opened form.
 

Users who are viewing this thread

Back
Top Bottom