Run reports w/ parameter from program

I have about 20 different reports that have to be ran each day.   The reports 
require one input parameter from the use, Enter_Date.  The Enter_Date 
parameter is the same for all 20 reports.

Can I automate this process allowing the user to enter  the Enter_Date once, 
then programaticlly produce all the reports?   A code snippet would be great 
and Thank You!   I am using Access 2007.

0
Utf
2/11/2008 12:36:00 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies
511 Views

Similar Articles

[PageSpeed] 3

Instead of having the Input parameter in a query or report,  you could have
an
unbound Form containing a text box (txtDate) and a command button. The user
types the date into the text box and presses the button.

Then you can use code attached to that button on the OnClick Event

Dim Crit as string
Dim MyDate as Long

MyDate = Format(Me.txtDate, "0")
'turns the date into a number
Crit = "[Enter_Date] =" & MyDate
'Filters report using Enter_Date

DoCmd.OpenReport "YourFirstReport", acPreview, , Crit
DoCmd.OpenReport "YourSecondReport", acPreview, , Crit
etc.


Evi






"Mike P" <MikeP@discussions.microsoft.com> wrote in message
news:21DE7D4B-0465-4917-806B-F9B4F2337C15@microsoft.com...
> I have about 20 different reports that have to be ran each day.   The
reports
> require one input parameter from the use, Enter_Date.  The Enter_Date
> parameter is the same for all 20 reports.
>
> Can I automate this process allowing the user to enter  the Enter_Date
once,
> then programaticlly produce all the reports?   A code snippet would be
great
> and Thank You!   I am using Access 2007.
>




0
Evi
2/11/2008 2:38:49 PM
This is a great start, but I think I am doing something wrong since the Enter 
Parameter Value window still pops up asking for the Enter_Date value on each 
report.  

Also, can I have the 20 reports go directly to 20 PDFs as opposed to having 
them all open up?  The goal is to produce the 20 reports in PDF format saved 
in a directory based on the single date that I enter in the unbound Form 
containing the txtDate.   

Thx for your help with this.

"Evi" wrote:

> Instead of having the Input parameter in a query or report,  you could have
> an
> unbound Form containing a text box (txtDate) and a command button. The user
> types the date into the text box and presses the button.
> 
> Then you can use code attached to that button on the OnClick Event
> 
> Dim Crit as string
> Dim MyDate as Long
> 
> MyDate = Format(Me.txtDate, "0")
> 'turns the date into a number
> Crit = "[Enter_Date] =" & MyDate
> 'Filters report using Enter_Date
> 
> DoCmd.OpenReport "YourFirstReport", acPreview, , Crit
> DoCmd.OpenReport "YourSecondReport", acPreview, , Crit
> etc.
> 
> 
> Evi
> 
> 
> 
> 
> 
> 
> "Mike P" <MikeP@discussions.microsoft.com> wrote in message
> news:21DE7D4B-0465-4917-806B-F9B4F2337C15@microsoft.com...
> > I have about 20 different reports that have to be ran each day.   The
> reports
> > require one input parameter from the use, Enter_Date.  The Enter_Date
> > parameter is the same for all 20 reports.
> >
> > Can I automate this process allowing the user to enter  the Enter_Date
> once,
> > then programaticlly produce all the reports?   A code snippet would be
> great
> > and Thank You!   I am using Access 2007.
> >
> 
> 
> 
> 
> 
0
Utf
2/11/2008 7:28:01 PM
It sounds as if you have a Parameter Value either within the report (Perhaps
in its OnOpen Event) or in the query on which the report is based.

Don't know how to do the Export to PDF bit.

Evi


"Mike P" <MikeP@discussions.microsoft.com> wrote in message
news:7C7B984C-E010-449D-9013-2BF53DE8998A@microsoft.com...
> This is a great start, but I think I am doing something wrong since the
Enter
> Parameter Value window still pops up asking for the Enter_Date value on
each
> report.
>
> Also, can I have the 20 reports go directly to 20 PDFs as opposed to
having
> them all open up?  The goal is to produce the 20 reports in PDF format
saved
> in a directory based on the single date that I enter in the unbound Form
> containing the txtDate.
>
> Thx for your help with this.
>
> "Evi" wrote:
>
> > Instead of having the Input parameter in a query or report,  you could
have
> > an
> > unbound Form containing a text box (txtDate) and a command button. The
user
> > types the date into the text box and presses the button.
> >
> > Then you can use code attached to that button on the OnClick Event
> >
> > Dim Crit as string
> > Dim MyDate as Long
> >
> > MyDate = Format(Me.txtDate, "0")
> > 'turns the date into a number
> > Crit = "[Enter_Date] =" & MyDate
> > 'Filters report using Enter_Date
> >
> > DoCmd.OpenReport "YourFirstReport", acPreview, , Crit
> > DoCmd.OpenReport "YourSecondReport", acPreview, , Crit
> > etc.
> >
> >
> > Evi
> >
> >
> >
> >
> >
> >
> > "Mike P" <MikeP@discussions.microsoft.com> wrote in message
> > news:21DE7D4B-0465-4917-806B-F9B4F2337C15@microsoft.com...
> > > I have about 20 different reports that have to be ran each day.   The
> > reports
> > > require one input parameter from the use, Enter_Date.  The Enter_Date
> > > parameter is the same for all 20 reports.
> > >
> > > Can I automate this process allowing the user to enter  the Enter_Date
> > once,
> > > then programaticlly produce all the reports?   A code snippet would be
> > great
> > > and Thank You!   I am using Access 2007.
> > >
> >
> >
> >
> >
> >


0
Evi
2/12/2008 10:29:13 AM
Reply:

Similar Artilces:

CRM 1.0 Crystal Print report error
Hi I am trying to use the builtin crystal reports and every report is coming back with the below error any advice on how to solved this? Regards J Error encountered by Crystal PageServer ---------------------------------------------------------------------------- ---- The error message returned is: Error detected by database DLL. [On Cache/Page Server: CRMSERVER.pageserver] You may need to restart your Crystal Services on your application server: You can accomplish this via the following stepsL 1. Click Start, point to Programs, point to Crystal Enterprise, and click Crystal Con...

Auto-print Pivot Table Report that cycles through all Page Field values...
Suppose I have a pivot report with a Page Field. In my case, it allows a drilled-down view for a given state using source data covering all states. Pretty common use case, I imagine. I'd like to be able to have excel print a multi-page report for all states (not together, but individually). It should just cycle through all values of the page-field value. This seems like a pretty basic thing to want to do with a pivot table but so far I don't see that it's possible. I mean, sheesh, they even called it the "page field" as if it's supposed to be part of a multi-pag...

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

How to create a "SO on hold" report in SmartList?
Hi, I tried both (GP -> SmartList -> Sales Transactions) and (GP -> SmartList -> Sales Line Items) and add "SO Number" and "Hold" two columns into the report. We do have lots of SO are on hold, but in the "Hold" column it shows "no" for all SOs. Can anyone show me how to create a "SO on hold" report in the SmartList? Thank you very much. stien You wont find this in Smartlist unless you have Smartlist Builder. You need to report agains the SOP10104 Table, the Sakes Process Holds Work and History table. This table contains...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

FRx report #2
Hi, I have an Income Statement in FRx which is restricted in the row format to pull a specific department and also uses account filters with the same restriction in the column format. I now have to modify that report to include a new department that just got created. In the column format, I included a separate column in the Month-to-date and YTD sections with the account filters restricted to that department. The problem with the report is that it doesn't tie with the GL trial balance. I'm not sure what the problem is but I'm guessing is with the row format. I would appreciate any...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

Saving reports as a .pdf or .rpt file.
Hello: Can someone please tell me how I can save my Excel reports as a .pdf or .rpt file, if this is possible? Your help is greatly appreciated. Regards, Dinesh. Dinesh, Not sure about .rpt files, but to save as a pdf you need to own the full version of acrobat (not just the reader). Then you can print to pdf. Dan E "Dinesh" <needhelp@needhelp.com> wrote in message news:0b4401c381eb$aea173a0$a001280a@phx.gbl... > Hello: > > Can someone please tell me how I can save my Excel reports > as a .pdf or .rpt file, if this is possible? Your help is > greatly...

Exchange 2k3 Recovery in another h/w
Friends Need your help guys!,, Is there any way i can restore exchange2003 in another h/w with same os? Existing exchange server name :osiExchange OS :Windows 2003 Standerd SP1. Domain member :osiExchnage.osi.local New H/w I hv installed Windows2003 Sp1 and joined to my existing domain ! do i need to keep the same hostname for new server? pls heelp me out by steps and advises Best Regards, On 27 Jan 2007 21:01:14 -0800, "Vamsi" <konasanimurali@gmail.com> wrote: >Friends > >Need your help gu...

Combine 2 presentations w/o losing hyperlinks?
I have 2 large presentations, each has hyperlinks within the presentation. Each pres also hyperlinks to the other. How can I package the 2 files so the hyperlinks are intact? Using ppt2007. I know I've done this before using ppt 2000 or 2002 but I can't remember how. In article <42C095B5-FBAD-4065-BA8D-1075E2D422FC@microsoft.com>, Srpd wrote: > I have 2 large presentations, each has hyperlinks within the presentation. > Each pres also hyperlinks to the other. How can I package the 2 files so the > hyperlinks are intact? Using ppt2007. I know I've done th...

Using a pivot to calculate an average w/o 0's
I have been killing myself with this problem for 2 days now, and I giv up. I can't solve this myself. It seems that Excel works differentl each time I use it. This is my situation: I have a .csv file w/ 20k records. I have a pivot table report that reads the .csv as the source. In the pivot, I need calculate the average for one of the columns i the .csv The problem is that 90% of the records have a 0 as the value for tha column. I dont want to average the 0's into the average. When I take out the zeros, i get a #DIV/0 error. I have successfully been able to make this calculation...

Access 2007 Layout View for reports upgraded from Access 2003
I notice that in Access 2007 only those reports newly created in Access 2007 appear to have access to Layout View. In an ACCDB that had been converted from an Access 2003 MDB the reports that had originally been created in Access 2003 do not have access to this feature. Any attempt to do so is met with a "Layout view is unavailable for this Report." message. Is there any way, short of recreating the report and manually copying over its controls and code, to upgrade such reports so that Layout View is accessible? Hi Benjamin, 1. Open the report in design view 2. Open the property s...

Re: Workflow just wont run automatically, i have to run them manually
Yes, but i realized what i was doing wrong. I assumed [bad idea] that if i create a case and hit Save & Close the first time, taht the rule will run. In order for the rule to run automatically, it has to be Save, once it saves it, then Save & Close. Thanks for your reply. "Hi, Did you check the workflow monitor to see if the rules get triggered correctly and complete sucessfully ? Have a nice day, St=E9phane Dorrekens " --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://...

Change paper size w/ WinXP
I recently updated to Win XP. In Excel 2000, I just noticed that when I do page setup, the paper size can't be selected. It is grayed out. I'd still guess that printer driver. Don wrote: > > I recently updated to Win XP. In Excel 2000, I just > noticed that when I do page setup, the paper size can't be > selected. It is grayed out. -- Dave Peterson ec35720@msn.com ...

Not-Selling Item Report
Is there a not-selling item report available? I would like to know which of my items have not sold in a certain period. There is a Last Sold column available on the Item reports. You could filter the report by this column. -- Jason Hunt Advanced Computer Systems Thanks for your help. This is exactly what I was looking for. (Should have found that myself). "Jason Hunt" <jhunt@advcs.ca> wrote in message news:f525685410ce8c7c3eeb9ee49c0@news.microsoft.com... > There is a Last Sold column available on the Item reports. You could > filter the report by this co...

Outlook Still Running
I am running XP Pro with Office 2003 Pro and sometimes when I exit out of Outlook, Outlook.exe and Winword.exe stay as processes still running. Does anyone else have this problem and what can do to make sure this does not happen? Thanks for your help -- Neil Remove ABCD from Email address to reply <neil154ABCD@earthlink.net> wrote: > I am running XP Pro with Office 2003 Pro and sometimes when I exit > out of Outlook, Outlook.exe and Winword.exe stay as processes still > running. Does anyone else have this problem and what can do to make > sure this does not happ...

percentages calculated for a report
I have a report for a query that pulls from 3 tables. The main table contains employee hours by month and budget code. The supplemental tables contain budget code descriptions and additional employee information. In the code footer, I calculate the total hours by code for the year-to-date. In the employee footer, I calculate the total hours by employee for the year-to-date. What I would like to add is column that shows the total hours by code as a percent of the total hours by employee. Is this possible? If so, how do I do it? Hello. C. Adamek wrote: > I have a r...

Very strange problems while running Great Plains on workstations
I notice that a few workstations in an office I support are having problems when they run Great Plains. Excel, Outlook, Word and Dynamics.exe are showing in the Application event log as being Hanging or Faulting. I also see Fault Bucket errors, but when I search online I cannot find any information online. Here is one of the Fault Bucket errors: 3:15:35 pm 28-Sep-06 Application Hang None 1001 N/A Fault bucket 296734104. Also, these workstations are experiencing problems printing PDF files. Has anyone out there seen this behavior and if so, how can these problems be fixed? Thank you, ...

Publisher 2000 will not run
I had problems with Publisher 98 not running which we=20 never did solve so I installed office 2000 to see if=20 Publisher 2000 would function. Same problem: The flash=20 screen pops up and then disappears. No program. Microsoft=AE Publisher 2000 Version 6.0 has encountered a=20 problem and needs to close. We are sorry for the=20 inconvenience. Howard, hi again, Have you tried opening Publisher in safe mode? Publisher retains all printer information within its publications. If you can open Publisher in safe mode, either regress or update your printer and video drivers. -- Mary Sauer MS MV...

Macro automatic run at open
Is there a simple way to have a macro automatically started when a workbook is open? Thanks Francesco Francesco, use the workbook open event, like this, Private Sub Workbook_Open() MsgBox "It Works!" End Sub To put in this macro, from your workbook right-click the workbook's icon and pick View Code. This icon is at the top-left of the spreadsheet this will open the VBA editor to the thisworkbook module, then, paste the code in the window that opens on the right hand side, press Alt and Q to close this window and go back to your workbook, now this will run every time you ...