troubleshooting Question

Print rport button w "Where =" conditions.

Avatar of Ken Milam
Ken MilamFlag for United States of America asked on
Microsoft AccessVBA
2 Comments1 Solution57 ViewsLast Modified:
I have a form [f-BagLabel] on to which I would like to place a "Print Report" Button.  A similar report [r-BagLabel] already exists, and its based on a query [q-r-BagLabel].  In this case, however, I want the PrintReport button to print a report specific to the current record at [f-BagLabel]

Ordinarily, I would copy the report and copy the query, associate some query criteria from [f-BagLabel] into the new query and associate the new copied report with the new query w/ criteria.  Then, I would add a button that would open this newly created report.  This, as I am sure you are aware, results in multiple instances of the similar queries and reports.  I need to learn how to use conditions in VBA to accomplish this task w/o resorting to my current technique.

How would I incorporate some VBA into this Button to print a report whereby a field in q-r-BagLabel = some value on the form where the button is positioned?

Thanks,
Ken
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros