+ Reply to Thread
Results 1 to 5 of 5

Access Search Form that opens a Report

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Access Search Form that opens a Report

    Hello All

    I have a table with 20 fields in it and I am trying to create a form so users can easily search for records. I would like something that has two combo boxes, a date range and one text box. The combo boxes would be tied to a particular field (Function, Rec Item), while the text box needs to search through all of the other fields. Once the search is done I would like it to open a report only showing records that match the the criteria set.

    I have seen things similar to this but the results always appear in a sub form and I cant do anything with it after that, at least to my knowledge.

    Thanks in Advance
    I am using Access 2007.
    Last edited by Zachraeth; 07-31-2013 at 01:50 PM.

  2. #2
    Registered User
    Join Date
    10-25-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: Access Search Form that opens a Report

    Need a bit of clarification.

    On the Combo boxes, will each combo box be tied to one specific field and the user chooses from the available options in that field? Or will one box be tied to field names, while the other box is tied to whichever is available based on the first box? Given this, I may be able to code up a VBA answer that will generate a query.

    Is the purpose of this query to update a set of records or simply review the information?

  3. #3
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Access Search Form that opens a Report

    The "Function" combo box will be tied to field names such as accounting, Tax, or Risk. While the second combo box displays the code tied to the function. So if the user selects accounting only acc codes show up in the Rec Item Drop down box. The query is there just to review information and allow the user to export to excel or print it off as needed.

    Thanks for the help.

  4. #4
    Registered User
    Join Date
    10-25-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: Access Search Form that opens a Report

    I created a sample table and form which gives you a start on what you wanted. I did not pull in the text box to search the entire table as I ran out of time I can allot for this. Review the form design for the combo boxes to see where I connected them to the table. Also there is VBA code behind the form. This codes runs whenever you first open the form, update the first combo box (Field Select), and when you push the button to generate the query.

    I did put brief notes in the code. You should be able to reverse engineer this to suit your needs.


    SearchForm.zip

  5. #5
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Access Search Form that opens a Report

    Thank you swhitesell, this is great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Filtering an Access Report using a Form with VBA
    By krisels in forum Access Tables & Databases
    Replies: 3
    Last Post: 03-19-2013, 06:24 PM
  2. Form Email from Report, Only if Report summary sheet lists Acct for that Sales Rep
    By lukep10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2008, 01:38 PM
  3. [SOLVED] saved worksheet opens in new with macro error report
    By margaret in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-19-2006, 07:00 AM
  4. Access.Application.Quit - opens Access again then won't close - He
    By Hluhluwe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2006, 07:20 AM
  5. [SOLVED] Excel opens with an error report whenever I Boot Up my computer
    By Carl T in forum Excel General
    Replies: 0
    Last Post: 11-19-2005, 01:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1