Launching Access Reports from an outside source.

  • Thread starter Thread starter Kelly Cromwell
  • Start date Start date
K

Kelly Cromwell

Alright here is my pickle.

I've written a VB application utilizing an MDB backend. I opted to use
access reports to save time and because the VB reporting engine was way to
cumbersome and limiting.

Anyway, I'm launching access reports inside my VB app. Now the problem lies
when I try to execute a report that is based on a query that requires
parameters. How can i set parameter values, and possible report label
values via code before the DoCmd OpenReport?

I can't use the Filter Option in the OpenReport method because the parameter
is involved in a join. When I try to use the Filter param, it still prompts
me for the value.

Any help in this matter will be greatly appreciated as i'll finally be able
to get some sleep ;)

Thanks,

Kelly Cromwell
 
Can you change the SQL of the Query on-the-fly? I would think you could add
a reference to DAO and then change the SQL of the query prior to running the
report.
 
Change the SQL of the query and save it before running the report
(add extra columns etc...) or use a temporary table to store values
and put code behind the report to look at the table to retrieve values.

Mark
RPT Software
http://www.rptsoftware.com

PS: Checkout our product if you convert your VB app to the web.
 
How do I change the SQL of a query and save it? Do i use the same automation
objects that I use to launch reports?
 
Back
Top