Solved Aesthetic boxes on a report (1 Viewer)

Then better make sure they understand report must always be run on last day of month and NEVER any other time (no "rare occasions"). So, what do you mean by "automate"?
 
Basically, a user clicks a button and the system will then print out all reports daily to PDF, save them in a specific location. Then rename the files appropriately, and then finally put them all together as one pdf before allowing the user to email that single file off.
 
Well, I couldn't even get to bed before this idea came to me. Will never sleep if I don't get it expressed here.

Change the query around. This SQL cannot be built or viewed in query builder Design View only SQL View because of non-standard JOIN clause.
[yr] and [mo] are input prompts that can be replaced with references to form controls.
I used Val() in DateSerial function because it did not recognize inputs as numbers.

SELECT DateSerial(Val([yr]), Val([mo]), tbl_DailyRandomsDummy.[ID]) As D, [1A], [1B], Data.ID
FROM tbl_DailyRandomsDummy LEFT JOIN
(SELECT tbl_DailyRandoms.ID, D_Date, tbl_DailyRandoms.[1A], tbl_DailyRandoms.[1B]
FROM tbl_DailyRandoms WHERE Year(D_Date)=[yr] AND Month(D_Date)=[mo]) AS Data
ON Data.D_Date = DateSerial(Val([yr]), Val([mo]), tbl_DailyRandomsDummy.[ID]);

Now use textbox expression and you always have 31 rows.
June7 I have 2 questions regarding the code you put on here. I have been playing around with the VBA with lots of help to see it work, but I was wondering, can this code be modified to allow a user to see the previous months entries on the 1st of every month? My 2nd question is why did you want to eliminate VBA altogether?
 

Users who are viewing this thread

Back
Top Bottom