Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Filter Report    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Query Based
Maurice Loucel 
     
5 months ago
I tried using a Query instead for the form and the report, I have to since I am combining 5 different tables, but the form works like magic all perfect but when I send the data to the report, the report ignores completely the filters and everything else and I end up with a report of all the data in the query.
I did add the lines to the report:
---> Someone told me to add the first line and try that way but does nothing

DetailsPrivate Sub Report_Open(Cancel As Integer)
    'Me.RecordSource = Forms!ReportFormForAuthorizationsF.RecordSource
  
    Me.Filter = Forms!ReportFormForAuthorizationsF.Filter
    Me.FilterOn = Forms!ReportFormForAuthorizationsF.FilterOn

    Me.OrderBy = Forms!ReportFormForAuthorizationsF.OrderBy
    Me.OrderByOn = Forms!ReportFormForAuthorizationsF.OrderByOn
    
End Sub


I am out of Ideas, can you explain why it doesn't work with Queries with multiple tables?

Thank you.

Maurice.
Joe Holland  @Reply  
      
5 months ago
Do you have the record source for the form and report using the same query?

Do you have any filters ON or loading with the report?
Maurice Loucel OP  @Reply  
     
5 months ago
Hi Joe thanks after your post I dig a little bit and I have no idea is this is a BUG from Access and Richard as well should check it out or maybe is just my computer.

This is what I have in the reportForm on the Print Button:
DoCmd.OpenReport "ReportForAuthorizationsR", acViewReport

I like that
but
gives me ALL the records not the ones I want.

Changing this to:
DoCmd.OpenReport "ReportForAuthorizationsR", acViewPreview

Displays the report without any issues whatsoever.

Any comments?
Joe Holland  @Reply  
      
5 months ago
Open the form and report in design view and look to see what you have for the record source for each. Are they the same?
Maurice Loucel OP  @Reply  
     
5 months ago
Yes Sir, sorry I forgot to mention, both point to the same query.
Joe Holland  @Reply  
      
5 months ago
Do a compact and repair just to eliminate any odd issues. Then check the Order By, Order By On Load, Filter, Filter On Load, Allow Filters properties of the form and compare those to the report. Something in the report is causing the mismatch of data.
Maurice Loucel OP  @Reply  
     
5 months ago
thanks I tried all of your suggestions, but no matter what it goes back to do the same thing over and over, so, for now I left it alone as acViewPreview and the report is a happy camper, I don't know if it is a glitch or something in the code but, for now it works, and:
"If is working, Don't fix it"

I am going to try to replicate the problem isolating only that particular module as a test, so that I don't mess up the rest of the program that is working fine, and I will report back if any issue or mistake I ffind in my code.

Thank you.
Joe Holland  @Reply  
      
5 months ago
Good luck Maurice. It is rewarding when you finally figure out is causes an issue.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Filter Report.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 4:42:56 AM. PLT: 0s