Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create a Search Form (Access 2000)

    I was wondering if anyone out there knows of an on-line resource that explains how to create a "search form" in Access - ie: where the user can choose a combination of options from drop-down lists, option buttons, date ranges etc and basically create his own query. This would be a very handy thing to implement in my databases.

    Thanks in advance.

    JoeK

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create a Search Form (Access 2000)

    You could start by simply looking at the sample Northwind database that comes with Microsoft Access. The database shows you some examples of search forms (dialogs) where the user can choose from dates etc to filter the result of a report. All these "search forms" work on the same principle:
    1. Create the query including the fields for a report.
    2. Create the report from that query.
    3. Design an unbound form that contains the controls for supplying the details to filter.
    4. In the query's criteria cell, add the expression that collects the value from the forms control. What the user selected in the form is now acting as the criteria in the queries criteria cells.
    5. Add an OK button to the form that when pressed opens the report that is designed from the query!

    I'll see if I can find some on-line pages for you that helps to illustrate the process.

    Cheers
    Regards,
    Rudi

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create a Search Form (Access 2000)

    Hi Joe,
    I can't confirm 100% as I do not have access to Access currently, but I also recall that Access help has a very comprehensive guideline for this procedure. If you do a search in Access help on "Criteria Form"... you should get to it!

    I'll still see if I can help to locate some web pages for you though!

    Cheers
    Regards,
    Rudi

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create a Search Form (Access 2000)

    Here is a good link!!
    This should guide you through the process!
    Regards,
    Rudi

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create a Search Form (Access 2000)

    Rudi,

    InputParameters only apply in an .adp, not in an .mdb

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create a Search Form (Access 2000)

    I don't know of a one-stop source that explains all aspects of this. Some links you may find useful:
    Microsoft:
    ACC2000: How to Filter a Report from a Pop-Up Form (can be applied to a form as well as to a report)
    ACC2000: How to Create Synchronized Combo Boxes
    Here in the Lounge:
    Threads starting at <post#=498,138>post 498,138</post: > and <post#=132,255>post 132,255</post: >.

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create a Search Form (Access 2000)

    Hans, excuse my negligence...but "adp"???

    I may be misunderstanding you, but a form can be used to provide criteria to a query in an mdb file!

    Can you tell me more clearly where my advice is at fault.
    Tx
    Regards,
    Rudi

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create a Search Form (Access 2000)

    Of course a form can be used to provide criteria to a query - there are many examples of that here in the Lounge and elsewhere. But the link you posted in <post#=513,152>post 513,152</post: > describes how to use the InputParameters property of a report; this property is only available in an Access Data Project (.adp). From the online help:
    <hr>You can use the InputParameters property to specify or determine the input parameters that are passed to a SQL statement in the RecordSource property of a form or report or a stored procedure when used as the record source within a Microsoft Access project (.adp).<hr>
    and
    <hr>A Microsoft Access project (.adp) is an Access data file that provides efficient, native-mode access to a Microsoft SQL Server database through the OLE DB component architecture. Using an Access project, you can create a client/server application as easily as a file server application. This client/server application can be a traditional solution based on forms and reports, or a Web-based solution based on data access pages, or a combination of both. You can connect the Access project to a remote SQL Server database, a local SQL Server database, or a local installation of SQL Server 2000 Desktop engine.<hr>
    In other words, you cannot use InputParameters in an "ordinary" Access database.

  9. #9
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create a Search Form (Access 2000)

    Aah, thanx. That is clearer. So it is just the link I posted that was incorrect based on Joes Q. I thought all my posts were inaccurate...and I was concerned about that as I was sure of my info!

    I'll keep the link there as it may benefit others who browse this post if they need a reference to ADP type parameter details!!

    Tx for the correction on my post!
    Cheers
    Regards,
    Rudi

  10. #10
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create a Search Form (Access 2000)

    Rudi and Hans: you have pointed me in the right direction.

    Many thanks,

    Joe

Posting Permissions

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