Results 1 to 9 of 9
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    report builder


    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

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    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.

  3. #3
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Ok great. Do you have sample or sample code to get me started?
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    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.

  5. #5
    wouterv81 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    8
    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...

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    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.

  7. #7
    wouterv81 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    8

    RE: test database

    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

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    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.

  9. #9
    wouterv81 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    8
    Quote Originally Posted by June7 View Post
    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.
    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

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Expression builder help
    By jigg14 in forum Forms
    Replies: 1
    Last Post: 03-19-2012, 09:47 AM
  2. Expression Builder not there
    By schnuber in forum Access
    Replies: 1
    Last Post: 02-17-2012, 01:17 AM
  3. Expression builder
    By PJ_d_DJ in forum Access
    Replies: 2
    Last Post: 02-24-2011, 03:38 AM
  4. Epression Builder
    By ehrendreich in forum Programming
    Replies: 1
    Last Post: 12-26-2009, 02:33 PM
  5. Code Builder
    By nkenney in forum Forms
    Replies: 3
    Last Post: 11-04-2009, 10:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums