Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Using forms for custom queries

WilkoWilko Member Posts: 8
Hi Guys,

Does anyone have any advice on how to set up a query using a form? I can use the access wizards to perform queries, however would like to add this functionality to a form.

With the database I have created I want to search for Topic Names, hopefully by the users inputting the string into a text box, and then if the topic name exists, returning this form, if not returing an message saying that it doesnt exist. Any help would be much appreciated,

Ross

Comments

  • RichardKRichardK Member Posts: 14
    : Hi Guys,
    :
    : Does anyone have any advice on how to set up a query using a form? I can use the access wizards to perform queries, however would like to add this functionality to a form.
    :
    : With the database I have created I want to search for Topic Names, hopefully by the users inputting the string into a text box, and then if the topic name exists, returning this form, if not returing an message saying that it doesnt exist. Any help would be much appreciated,
    :
    : Ross
    :
    Hi

    Queries can take input from the form.
    When creating the query right click on the section called criteria for the column you wish to have the query setup by and select Build. It should bring up expression builder. ( I am presuming you are building your query up in design view. )

    Then select the relevant location you wish to take this value from.

    The criteria should then look something like the following. You should be able to build up a similar expression from the list boxes on the expression builder form.

    [Forms]![SearchMenu]![cboCompanyID].[value]

    when the query runs it will do one of two things.
    Take the value from the form if it is open or ask for input if it is not.

    You can now run the query or the form based upon that query and it will give you the answer you want.

    Hope this helps.

Sign In or Register to comment.