Very Basic Search Query from Newbie (1 Viewer)

  • Thread starter Thread starter Argonaught
  • Start date Start date
A

Argonaught

Guest
I am trying to develop a simple database were i enter a service and location and it then gives me all the services in that location.
:confused:
My table Fields are:
[Service Number]
[Name Of Service]
[Company Name]
[Description Of Service]
[Address1]
[Address2]
[Address3]
[County]
[Postcode]
[Telephone]
[Fax]

[Website]

I would like to cross reference [Name of service] with [county] to, for example give a list of all plumbers in Devon. I then want it to display all the other fields for those records selected.
I am trying to develop this to use on a website, is this possible to intergrate a database into a web page or am i wasting my time?

Any help would be very much apreciated.

Cheers
Argonaught
 
Last edited:
This is the way i have been told - if wrong please correct me.

Create a query with all of your table fields in.

In the query design, the criteria box underneath the corresponding field type:

Like [Description Of Service:]&*
Like [County:]&*

This will then provide a message box prompting for a description and then county.

The &* on the end enables you to put part descrptions in e.g for Devon you could enter Dev and will bring up all Counties beginning with Dev. Also leaving the message boxes blank will bring up all data.

As for the website - not too sure.
 
Thanks, this works fine. :D
Is there a way i can get the query done in a form?
What i mean is the form has two fields, [name of service] & [area of service] and a search button to the side, once both fields completed and the search button pressed it will list the info below, instead of the popup box.

Cheers
Ja
 
To create a form you will need 2 Textboxes and a listbox No button :)

The Text boxes should be named the same as the corrosponding fields in your table [CompanyName] CompanyName (The name can be changed in the Properties)

Create a listbox that gets its Record set from the query you made before

now open your query and in the criteria box right click and select Build..

This will allow you to link the criteria directly to your Textbox on your form

Go to the Forms folder, and click on the name of the form you are working on, scroll down to find your textbox then Double click it. this will put something like
Code:
[Forms]![Find Job]![Companyname]

Do that for both Fields in your table

and last but not least you can make a macro to update the list after the data in the field updates

Click on the Textbox then right click and look at the properties.
Select the Events Table, put the curser in After update, then click the ...
this will bring up a menu, choose Macro

then in macro there will be a field called "Action"
Drop down that menu and find "Refresh" select that, it will give you a text box option on the bottom, enter in the name of the listbox. Save the macro

Do that for both Text boxes and and you will have a working Search form. :D
 

Users who are viewing this thread

Back
Top Bottom