Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32

    Generate report, using check boxes or query

    Hi



    I have 10 rows. I want for those rows to have checkboxes for every row. When I check the checkbox for 1 or 3 rows, the selected rows to be printed in report.

    Or

    When I run query and the result from query to be available for report with all fields from the form, because before to print the report, I want to put more info in that query (like SUM) and then print with total amount.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Would a listbox work?

    http://www.baldyweb.com/multiselect.htm

    If you use checkboxes, presumably in a continuous or datasheet form, it has to be bound to the table. That means multiple users can conflict with each other.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Hi, thank you for the answer.

    The DB will be used always only from one person. I will try with listbox, but I need also extra fields, to put some info there before report. I mean, if we have listbox with following content:

    Word
    Access
    Excel
    PowerPoint

    And if I choose Word and Access (with query maybe) to open new form with that results. Then there will be new fields and I want to put amount like:

    Name | Count | Amount |Total
    ---------------------------
    Word | 5 | 20 |100
    Access | 6 | 3 |18


    And those result I want to be printed in report

    The main purpose of question is: How to say to the Report "Print what you see in that form"?
    If I'm not clear, I will create db to show
    Last edited by rumenrs; 03-07-2013 at 06:05 AM.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    A sample would probably help, if you're still stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Ok, I will create soon a good example

  6. #6
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Quote Originally Posted by rumenrs View Post
    Ok, I will create soon a good example
    As I said, here is the example.

    I found one completed DB and I want to modif it.
    In this db, when I open the form "frmMultiSelect2", select some values from list box, then press the button OK, access return me only the selected values, but in table (qryMultiSelect), not in FORM.
    So I want this table/query -> qryMultiSelect to be in FORM. I created in FORM, the name is: "f_qryMultiSelect" and I want this "f_qryMultiSelect" to be returned like results, after pressing the button OK (not to return "qryMultiSelect")

    After that, the returned results in form f_qryMultiSelect, to be printed in Report/Printer.

    Thanks MultiSelectDemonew.mdb
    Last edited by rumenrs; 03-13-2013 at 08:03 AM.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    So use this technique:

    BaldyWeb wherecondition

    and use the strCriteria in the wherecondition. Will work for form and report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Quote Originally Posted by pbaldy View Post
    So use this technique:

    BaldyWeb wherecondition

    and use the strCriteria in the wherecondition. Will work for form and report.
    Can you make it for me in given example?

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Dive in and try. What's the worst that could happen?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Quote Originally Posted by pbaldy View Post
    Dive in and try. What's the worst that could happen?
    Yes, you are right. I just ask you, because I needed yesterday urgent, to show how is work
    But I will try it

    Sorry, for the previous post.
    If my problem is solved, I will post here the example

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Post back if you get stuck. I'm not abandoning you, but I'm not doing it for you either.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Hi,
    I can't understand this:

    DoCmd.OpenForm "SecondFormName", , , "FieldName = " & Me.ControlName
    Where SecondFormName is the name of the form being opened, FieldName is the field in that form's recordsource the restriction is based on, and ControlName is the name of the control on the current form that contains the value to be shown on the second form. As you will find throughout VBA, text and date values are treated differently. For text:

    DoCmd.OpenForm "SecondFormName", , , "FieldName = " & Me.ControlName


    FieldName is the field in that form's recordsource the restriction is based on, and ControlName is the name of the control on the current form that contains the value to be shown on the second form.

    What you mean
    FieldName and ControlName?
    Who is that control?
    and this:
    form's recordsource the restriction is based on

    I'm using in button this above.

    Access say: Run-time error 438. Object doesn't support this property or method

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you get this figured out?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    I change my mind...

    I'm still stuck

    Last edited by rumenrs; 03-16-2013 at 12:59 PM. Reason: Solved

  15. #15
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    All what I need is details explanation, what and where I have to use your code... and I will do it my self.
    My last step is to print what I see in the form...
    Please, help... or give me simple example

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 08-11-2011, 11:42 AM
  2. Query Won't Generate Report
    By italianfinancier in forum Queries
    Replies: 1
    Last Post: 06-02-2011, 03:48 PM
  3. How to Query fields with check boxes?
    By JynxRD in forum Queries
    Replies: 2
    Last Post: 09-10-2010, 08:35 PM
  4. To check or Un-Check all Boxes in a form
    By devcon in forum Forms
    Replies: 7
    Last Post: 05-01-2010, 12:03 AM
  5. using a Form with combo boxes to generate reports
    By mistervelasco in forum Access
    Replies: 2
    Last Post: 10-28-2009, 03:38 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