We help IT Professionals succeed at work.

Link in Sublist not applying the filter

Marc Jacobs
Marc Jacobs asked
on
201 Views
Last Modified: 2014-10-10
HI,

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
Thanks
Comment
Watch Question

Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Assuming ClientCode is on a Subform:

[Forms]![Dashboard]![Practice_Client-Preview].Form![ClientCode]

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.

Author

Commented:
for reference the error we get is attached.
Thanks
access-error.png
Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

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

On the main form, the dashboard is not bound.
Thanks
error-after-change.png
Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
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 CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
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.

JeffCoachman
Database9.mdb

Author

Commented:
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.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.