473,657 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use vb code to run report with parameter query then save as pdf?

4 New Member
I have an Access report that is populated by a parameter query. I need to run the report for 250 different filters then save. How do I write a code that will run the report then save it as pdf250 times?

Jason
Aug 20 '10 #1
3 3070
Delerna
1,134 Recognized Expert Top Contributor
Does it have to be pdf?
Aug 20 '10 #2
Delerna
1,134 Recognized Expert Top Contributor
if not this piece of code might help

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, "rptReportName", acFormatSNP, "c:\SaveFolderName\SavedReportName.SNP"
  2.  
Bind the report to a query that has the criteria for the necessary fields bound to textbox's on a form.

On that form loop through a DAO recorset of the 250 report filters updating the filter textboxes and running the posted code above.
Aug 20 '10 #3
jmborron
4 New Member
This is an A2007 that has the save as pdf add in. I think I can use the DoCmd code with acFormatPDF then save. I have very limited knowledge of VB it is the loop code that i'm not too sure about.
Aug 20 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2674
by: Betrock | last post by:
This is probably very simple, but I just can't see my way thru it..... Short version: keyed values(numeric)in a lookup table are stored in a main table. They are displayed as text values - the keyed values description. I need a parameter query to return a range of these values. The parameter input won't accept the 'text' version. You can do it with 'Find' because you can select 'as formatted'. But I need a range. Please, any...
1
3800
by: Cory | last post by:
When I run the subroutine testEmailContacts the msgbox says that there is only 1 record. The sql for qyEmailContactsQyCard is below. There is over 3000 records in the table "tbl:Contact". What am i doing wrong? Thanks in advance. PARAMETERS cardYesNo Bit, ParSearchCard Bit; SELECT .ContactID FROM WHERE (((.Card)=)) OR ((()=No));
2
550
by: Matt W via AccessMonster.com | last post by:
I based my parameter query off the following posting, but can't seem to work out a little kink. I cannot bring up a report without first typing in the month and year three times. The first time for my Form , the second for the parameter form, and the third which I can't figure out where on earth that one came from. How do I clean this up so I can type in the criteria just once into the form I created? I tried putting !! in the criteria...
5
4613
by: sara | last post by:
I have reports that run from a form where the user can choose a date range, or they run automatically for a week in the "Weekly Reports" option. I created 2 queries and 2 reports - one query uses the WeekEndDate to filter, and its associated report heading says "For the week Ending " & forms!frmPrintReports.getWeekEndDate. The other query selects the date range using "Between" and the 2 dates on the form. Its associated report header...
1
1945
by: allie357 | last post by:
I am trying to add a form with a combo box to an existing parameter query report. I followed the directions from this link:http://office.microsoft.com/en-us/assistance/HA011170771033.aspx However, even though the form pops up when I click on the report, the combo box is not populating and the report still has popping up parameters, even though I thought I removed them. Any help is appreciated.
2
1767
by: Haas C | last post by:
Hey all, I created a Query (in Design View) which asks the user for an "As Of Date" which would then display relevant data. I put in the Criteria Row of the Query Design for the Date field. Is there anyway to put in a default of today's date in the input box and allow the user to change it to whatever they want? Please let me know if this needs further clarification. Thanks for all your help in advance.
5
1775
by: TonyJH | last post by:
Hi. I'm new to this database world. Just started Access training a few months ago and have a somewhat complicated database already built. In a nutshell, I have a select query that uses a parameter callout so the user can enter a serial number of a widget and get test information for a report. The query pops out the test data in, for simplicity, in two columns, rest result Type A and Type B. The challenge for me is getting the results broken...
1
4116
by: Ben | last post by:
NooB: Anyone help with what I could be doing incorrectly here? Trying to have a parameter drop down list where a user can select one or more of the available values contained in the table to filter out results. Have a single table with five values. Keep getting the following error.... Table name is Name Field is NickName Parameter name is "Nick", datatype string, prompt "Select NickNames",
4
1896
by: ashutoshvyas | last post by:
I am designing a data report in VB6. In data environment it is possible to selet tables and 'select quries'. But I want to generate a report based on parameters passed by user, so i had created a parameter query in ACCESS which is not available in the properties of command1. SQL code of query is as under : SELECT Customers.account_no, Customers.card_no, Customers.name, payments.amount, payments.payment_date, dlt_3., total_amount. FROM...
16
9175
by: KaleeyJ | last post by:
I have a report that uses a parameter query where the parameter is supplied by a form in my db - frmSINGLE. I need to run this report based on a different form - frmMULTI. frmSINGLE may or may not be open - in any case, I don't want to use it. I would like to avoid having two reports (and two queries) that have the exact same contents save one criteria on one field - this db is big enough as is. So my plan is to change the record source on...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.