Results 1 to 2 of 2
  1. #1
    max3 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    1

    Form/report command button code

    Could anyone shed some light on the code needed for a command button which returns the results of a filter (applied to a form AND subform) to a report. I seem to be having problems when it comes to including the subform in the code.

    Cheers.

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    One way is to treat you report as you would with your form. Create a report with the header details in it then add a sub report containing the child details as per your subform.

    Alternatively when you create your report introduce a group by section into your report and group by the field that you are using to filter out the data. So for example if you are printing Invoices You would group by invoice number and in the detail section you would have your order details there.

    Likewise if you were wanting it by supplier you would group by supplier in the group header then in the detail section you would list all the invoice headers to show all invoices raised by the supplier.

    By setting the Group footer to start a new page After each supplier it would effectively create a report for all suppliers seperately.

    David

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

Similar Threads

  1. Export Command Button in Form
    By jjmartinson in forum Forms
    Replies: 3
    Last Post: 08-25-2009, 01:28 AM
  2. Command Button Help!
    By arthura in forum Programming
    Replies: 3
    Last Post: 06-30-2009, 12:55 PM
  3. Replies: 1
    Last Post: 04-06-2009, 12:05 PM
  4. Adding Command Button To Form
    By uneek78 in forum Forms
    Replies: 7
    Last Post: 03-27-2009, 07:43 PM
  5. Command button code
    By lfolger in forum Forms
    Replies: 3
    Last Post: 03-25-2008, 04:26 PM

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