Form:open a report grouped on 'A' sorted by dates

Punice

Registered User.
Local time
Today, 09:03
Joined
May 10, 2010
Messages
135
For use with Access 2007, I need a form to open a report that groups on ‘Brokers’ and displays ‘Deposits’ for each group based on a ‘StartDate’ and ‘EndDate’ the user enters on the form and picks the ‘Preview Report’ button that executes some VBA code on-click.

Currently, the code provided by Allen Browne works ok, when the date fields are empty. That report shows all of the brokers grouped by ‘brokers’ and all deposits for all records, including sub-totals for each of the brokers. That is ok for a summary report. However, when one or both date fields contain a date(s), the report only shows the headers.

I have records for multiple years that the query gathers from a table called ‘tblInvoices”, but I only want the report to group the ‘Brokers’ and show the ‘Deposits’ for each broker between the dates entered and (later), eventually, for a ‘broker’ that I select from a combo box on the same form.

I did try solving this on my own, which is how you learn how to use the program, but am running up against a dead-line and am seeking assistance from you wizards lurking in the background. Thanks in advance for your most appreciated assistance. Punice
 
I see a lot of lookers, but no advisers. Am I asking something stupid. (be nice).
 
I didn't answer this, when you responded: "So, you are using a form for entering the date parameters and then you say that nothing shows up if there is anything in it?" There is just the headers of the report and a summed column of "0", when I enter any date(s) in the start &
end date windows. But, when I leave it blank, all brokers appear, grouped as desired, displaying all deposits todate with the correct totals per group.
 
Hey, no apologies necessary. After all, you are helping me and others at a very affordable price.
I just didn't know if I did everything right when I posted my initial help request. I would prefer to email the db to you rather than post it here. Ok. Punice
 
Re your last, where you said "PM coming with email address."

Stupid question: what do you mean by that, particularly' by "PM"?
 
Me again, Punice: I discovered what "PM" was and am ok.
 
Thank you Bob for what you did. That fix solved my date sorting problem. I still have to solve the problem where I pick a 'broker' from a combo box list on a form that opens a report that presents all of the records (eg, Broker, Deposit Date & Deposit), but only those deposit records for the selected 'Broker'. (My combo box is unbound & I don't have a table associated with the form and 'load' the report from a query (q_Deposits) that contains the correct data for the fields I need to display in the report.)
 
Bob, everything you did for me worked exactly as I needed. I agree with you that I need to use more meaningful names. Always planned to do that, later. Just in a hurry to finish. Again, thank you for your dedication to solving my requests. I've learned some more about how to use the db from your example.
 

Users who are viewing this thread

Back
Top Bottom