Avatar of Marc Jacobs
Marc Jacobs
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Link in Sublist not applying the filter


We are using an on-click Macro instruction when clicking on a client in a sub list, within the main form, it should then apply the filter to show the results in the sub preview form but its not working.

The ApplyFilter condition is [Forms]![Dashboard]![Practice_Client_List]![ClientCode]=[Forms]![Dashboard]![Practice_Client-Preview]![ClientCode]

Any assistance would be greatly appreciated
Microsoft Access

Avatar of undefined
Last Comment
Marc Jacobs

8/22/2022 - Mon
Scott McDaniel (EE MVE )

Assuming ClientCode is on a Subform:


Also, be sure that Practice_Client-Preview is the name of your Subform CONTROL on the main form. The name of that control may or may not be the same as the form you're using as a subform.
Marc Jacobs

for reference the error we get is attached.
Scott McDaniel (EE MVE )

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Marc Jacobs

After the above changes made the following error (attached occurs)

On the main form, the dashboard is not bound.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Jeffrey Coachman

Is the dashboard form open when you run this macro?

What is the *exact* spelling of the form's name as it appears in the Navigation Pane.
Jeffrey Coachman

I am not sure I can visualize what you have there.
Can you elaborate a bit more about this interface?
< sub list>?
<sub preview form>?

As far as I can tell a simple main/subform is all that should be needed.
So selecting a Customer in the main form will automatically filter the subform for that customers Orders
(no coding or filters required)
Sample is attached.

I am sure Scot can correct your syntax and/or troubleshot the issue you are having here directly, I am just posting an alternative.

Marc Jacobs

Re-ran this again and it worked, although after the 2nd attempt.

1. Compact the database
2. Compile the database - open the VBA Editor and click Debug - Compile. Fix any errors and continue doing this until the menuitem is disabled.
3. Compact again.

Sometimes it helps to Decompile the database. To do that, create a shortcut with this as the Target:

"full path to msaccess.exe" "full path to your db" /decompile

Run that shortcut, then run the 3 steps above.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.