Creating a Query using a form

sush

Registered User.
Local time
Today, 22:00
Joined
Feb 8, 2000
Messages
29
Hello,

I want to create a Query by the user being able to select the criteria using a form.

ie, if i have 3 tables, i want to search for an item which is determined by the tables, how can the user enter specific criteria i,e
Table 1 (field) And Table 2(field) or Table 3(field).

I think it is refered to as a Query by form. but i dont quite understand how to create one, if this is the correct way

Thanks
 
hi,
let say you have 3 tables: Customer, Country, Industry.
you want a form where the user can look for a customer by its country, its industry and name.
you make a new form called Search.
then you insert 3 combo box or list box: cbCountry, cbCustom and cbIndustry.
the data source are the three tables.
you design a new Query and add three criterias:
SELECT ...
FROM ...
WHERE [Form]![Search]![cbCountry] = Country.CountryID And [Form]![Search]![cbCustom] = Customer.CustomerID And [Form]![Search]![cbIndustry] = Industry.IndustryID

a subform can be in ad atasheet view the result of the search (ie based on the query).
you can also add check boxes to allow a or/and criteria.

HTH,
Erik.
 

Users who are viewing this thread

Back
Top Bottom