Results 1 to 9 of 9
  1. #1
    mwabbe is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    79

    Generating Report from Form

    I want to have a form with two combo boxes on it. one for Employee. another for (info, ben, training, emergency contact, discipline).
    and then have a report made just for what i select.



    is this possible? thanks

  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
    Presuming you mean to open an existing report filtered to the selections made, this technique would be one way:

    www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mwabbe is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    79
    when i select the name and report i want to filter how do i make it open up the report i selected. using that technique wouldnt i have to code in which one would open by name? if its selected in the combo box. the name would change.

  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
    If you're using a combo to let the user select the report:

    DoCmd.OpenReport Me.ComboBoxName...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    mwabbe is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    79
    New Question. Still on the same subject. I currently have two combo boxes: one cboEmpName, cboRepName. they show all names and rep names in the db. the reports get data from the queries and so now i was wondering if it is possible to set a the criteria of the filter to the name chosen in cboEmpName and requery the open the report so that it will only be of records for that employee

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Depends on the view. The new "Report" view in 2007 can be requeried. Preview is static.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    mwabbe is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    79
    thanks pbaldy for sticking with me. i got it working how i want it .

  8. #8
    mwabbe is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    79
    not yet i guess. how do i change it so when i click the button to open it, it will just open it and not print it right now it prints it.

  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
    Look in VBA help at the arguments available for OpenReport. One of them determines the mode it opens in. You want preview, but the default if unspecified is printing out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Generating stats - newbie question
    By FavouredEnemy in forum Reports
    Replies: 3
    Last Post: 04-15-2010, 08:11 AM
  2. Help in generating product group and Combobox
    By lm_lopes in forum Access
    Replies: 0
    Last Post: 02-28-2010, 05:44 PM
  3. noob prob, generating next report
    By flash319 in forum Reports
    Replies: 2
    Last Post: 08-04-2008, 03:10 PM
  4. Replies: 2
    Last Post: 09-01-2006, 04:03 PM
  5. generating random numbers on form
    By anitra in forum Forms
    Replies: 1
    Last Post: 02-14-2006, 10:08 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