I think I've got the right forum :s

Grezzo

Registered User.
Local time
Today, 09:07
Joined
Feb 28, 2005
Messages
13
OK I know I'm asking a lot here, but I don't know how to go about this:

I have a table called customer with Name, Name/Number, Road, Suburb, Town, County, Postcode, Telephone.

The user may need to update these details and therefore I need a way of looking them up. That I can do by one field, but I want the user to be able to lookup the customers by any of the fields in the table, e.g look up the customer by County + Name/Number.

How do I go about this :confused:

Cheers for any help
 
Grezzo,

Use the search facility here and look for "Search". You should find some
examples.

Also, look in the Sample Database Forum. You will find more examples.

Wayne
 
but I want the user to be able to lookup the customers by any of the fields in the table, e.g look up the customer by County + Name/Number.

You can consider using the Filter by Form feature in Ms Access.
 
Have a form with textboxes for each of the fields you want to look up and build a SELECT query based off the textbox values.

Code:
SELECT * FROM [TABLE NAME]
WHERE 
    [TABLE NAME].[FIELD NAME] = FORMS![FORM NAME]![TEXTBOX NAME].[VALUE] AND 
    [TABLE NAME].[FIELD NAME2] = FORMS![FORM NAME]![TEXTBOX NAME2].[VALUE]

Look up iff() and isnull() - you may want these to help you determine if you want exact matches or whether or not it's okay to have blank text boxes.
 

Users who are viewing this thread

Back
Top Bottom