14 minutes ago: Please note that the webserver will soon get its weekly reboot at 4:00 am Eastern Time. You may continue to use the site as normal, but you will be logged off at that time. You should be able to log right back on immediately, however. If you are in the process of placing an order, please make sure to complete it as quickly as possible, or come back after the reboot. Thank you. Sorry for any inconvenience.  Dismiss
 
Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Developers    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Same Report Different Fields
Bryan Weaver 
     
3 days ago
I have a table that holds information on some photos.  I have 8 queries that pulls information on 6 photos (photos 5-10, photos 11-16, etc.).  I then have 8 reports that are identical except for source data and field names.

What I am thinking of doing is taking the single table and splitting it into multiple tables with each having the same field names.  So I would have a table for photos 5-10 another for 11-16, etc.  I would adjust the queries accordingly.

Would I be able to take those 8 reports and make 1 report and change the data source to the needed query using VBA?  If so, they what would happen if a user want to have say the report for photos 5-10 and photos 11-16 open at the same time?
Richard Rost  @Reply  
           
3 days ago
I wouldn't split the table just to support the reports. Eight nearly identical reports and queries is usually a sign that the data or report design can be generalized.

Ideally, each photo should be a record in one photo table, with a field such as PhotoNumber (and whatever record it belongs to). Then you can use one report and filter it when opening it:


DoCmd.OpenReport "PhotoR", acViewPreview, , "[PhotoNumber] Between 5 And 10"


Replace PhotoNumber with the appropriate field name, of course. The report's Record Source can be one query that returns all photos with the same field names every time.

You can also pass the range in OpenArgs and set the report's Filter or RecordSource in the report's Open event, but if a simple WhereCondition does the job, that's the route I'd take.

As far as having two different ranges open at the same time, don't design this around changing the RecordSource of a shared open report. A report object isn't a good multi-window interface for independently previewing multiple filtered versions of itself. If users really need side-by-side previews, consider a combined report, separate report objects, or export each selected range to its own PDF.

But definitely don't create multiple identical tables for photo ranges. Keep the data in one properly structured table and let the query/report filter decide which six photos to display.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

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: 12/6/2026 3:44:43 AM. PLT: 1s