User Profile
Collapse
-
It works! It works! THANK YOU!! -
Thanks so much for your help! I havent had a chance to look at this yet, but I will do it tomorrow (Monday) and let you know what happens
JessLeave a comment:
-
Thanks. I emailed you this morning. I appreciate your wiillingness to help out! I know you are busy and I will continue to try and figure it out myself, but any insight is much appreciated!
JessLeave a comment:
-
If you dont mind, I would appreciate the help. Can you PM me your email address?
Jessica...Leave a comment:
-
I'm back <waving>
I took a little break on this code thinking if I went on to something else that I wouldn't pull my hair out anymore. Well, I now have the rest of the db coded and still havent gotten this one part to work. :(
I started out with this:
...Code:strSQL_2 = "SELECT distinct * FROM [OpCo Query] WHERE [OpCo Query].AreaID " & "= " & ![AreaID] strAreaNameLeave a comment:
-
yes ReportDate is in the OpCo Query which is pulled from tblDateItem (there are a total of 5 tables the query is based on)
I tried your most recent code and did not get an error! But....the reports were all blank (Report Header was there, just no data) Before we added the ReportDate filter all the data was pulled, just not correctly.
I really wish I was more adept at this!
Jessica...Leave a comment:
-
Thanks, that also doesnt work. I should mention that the ReportDate is a text column as it is just month and year and not an actual date. So I took out the #
I keep getting a Runtime Error '2465'Code:strSQL_2 = "SELECT * FROM [OpCo Query] WHERE [OpCo Query].AreaID " & "= " & ![AreaID] And [Opco Query].ReportDate = " & Forms![Sysco Reporting Database]![cboDates] & "
...Leave a comment:
-
Hmmm...well I finally got a chance to review the code and discovered I have no place that the code actually says to only use the date in cboDates for the report. So, what would be the best/easiest way to change this? I would guess here:
strSQL_2 = "SELECT distinct * FROM [OpCo Query] WHERE [OpCo Query].AreaID " & "= " & ![AreaID]
would it work to just add
AND {Opco Query].ReportDate = cboDates.value...Leave a comment:
-
I let the code create all the reports and took a second look at them - Whats happening is that every other report has the wrong month. They all have The right titles, but the code is pulling alternate months for each report. I think there must be some iteration problem.
Jessica...Leave a comment:
-
The title is reflective of what is chosen in the combo box, but the data is wrong, just for the first report. The subsequent reports are all correct.
I will take a look at the rest of the suggestions after this lovely 2 1/2 hour meeting I have this afternoon. Yay.
Jessica...Leave a comment:
-
One more thing, even though I have SELECT DISTINCT, it is still giving me some duplicates ...Leave a comment:
-
OK, its working but with a couple minor problems.
Here is the code
...Code:Private Sub btnPDFOpCoRpt_Click() If IsNull(Me.cboDates) Then MsgBox "Please choose a Date for the Report." Me.cboDates.SetFocus Cancel = True Else MsgBox "Press ctrl-Break to pause or stop the report." Dim MyDB As DAO.Database Dim rstUniqueIDs
Leave a comment:
-
Edited: Hold on, I think I got it.........
Stay tuned
Thanks!
JessicaLeave a comment:
-
Thsanks! Ill take a look at this and let you know what happenes, but I may not get back to it until Monday.
JessicaLeave a comment:
-
Thanks Stewart
I'm not sure this will work as it is my intent to run 76 pdf's off of this one report. This is what I am thinking:
open a recordset with a list of all the AreaIDs
loop through each area ID, using that area as the parameter/filter for the report
have each report go through Leban's pdf code and turn it into a pdf with the AreaName as the file name.
Is there an easier way to do this?...Leave a comment:
-
Leban's Report to PDF question
Hi everyone! I'm new here and have a question regarding Leban's report to pdf tool. I am working on a database where we are using this code to send a report out to pdf(duh) BUT what I need to do is a bit more complicated.
Basically the db keeps track of stock in various locations. Each month, a report must be run for the 76 locations and put into pdf so the reports can be put onto sharepoint .
I would like the database...
No activity results to display
Show More
Leave a comment: