All; I am using access 2005. Does anyone have a sample of how I can build a report builder? I am thinking a form that the user can filter for criteria for their reports.
Thanks
All; I am using access 2005. Does anyone have a sample of how I can build a report builder? I am thinking a form that the user can filter for criteria for their reports.
Thanks
Build a form with unbound controls (probably comboboxes). Then couple ways to apply the inputs to filter report.
1. Criteria in the report RecordSource query refers to the form controls as input parameters. Review http://datapigtechnologies.com/flash...earchform.html
2. Use code (I use only VBA) to build WHERE CONDITION argument of DoCmd.OpenReport by referencing form controls
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ok great. Do you have sample or sample code to get me started?
Thanks
1. Review the referenced link
2. Search Access/VBA Help or Google: DoCmd.OpenReport or OpenForm WHERE CONDITION
http://msdn.microsoft.com/en-us/libr...ffice.10).aspx
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June7,
Thanks so much for posting that link. I'm doing a crash course in Access / VBA / SQL and building my first 'real' database and the link really helped to make it look a lot better.
I've got one problem with the report generator though:
So I've created a report generator page (similar to the one in the link) and have a handful of dropdown fields to filter the records to show on the report. All works perfectly. But when I try to add the number of records to the footer (by using the =count(*) function) I always get "#error" in the report footer.
Why can't I show the record count in the footer? I must be doing something stupid but I haven't figured out yet what it is...
The expression works for me. Do you want to provide your db for analysis? Follow instructions at bottom of my post.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
OK, here it is. Some buttons on the form are not working yet.
Please click the "report generator" button and then click the "generate report" button in the lower left corner. That one works and opens the report.
test DB rev02.zip
You have the Count textbox in page footer instead of report footer. Move it and remove the Long Date parameter from the textbox format property.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That's what I meant with doing something stupid Thanks for the help. I hope other novice Access/VBA users can get some ideas by looking at my test DB and hopefully doing a better job! Thanks again