hi all

sarab565

Registered User.
Local time
Yesterday, 20:39
Joined
Dec 31, 2007
Messages
20
i'm trying to create a form with a three text boxes they are:

Phone number 1

Phone number 2

Phone number 3

i want to create a sreach text box which will search in the three text boxes
 
what i mean that i don't know how to create a search button which will search in three text boxes
 
Is the Search button located on the same Form as the three Text Boxes?

Are you sure you don't mean:

You want to search a Database Table for any Phone Numbers that have been entered into any one of or all three of the Text Boxes on the search Form.

:confused:
 
the search button will be available in the same form
 
What about the other question in my post?

Are you sure you don't mean:

You want to search a Database Table for any Phone Numbers that have been entered into any one of or all three of the Text Boxes on the search Form.

.
 
i want to search a database table for any phone numbers that have been entered into a phone filed
 
to search this either

a) put the phone numbers in a separate table, so they are normalised or
b) in your query have another field
allphones: phone1 & " " & phone2 & " "& phone3

then you can search the allphones field (either directly with binoculars, or with vba code)
 
Or perhaps you want to search a single field for any occurance of these three numbers? Assuming you want to allow the search boxes to be blank (some or all) then use this as a criterion in your query
Code:
Like ([Phone number 1] & "*") OR Like ([Phone number 2] & "*") OR Like ([Phone number 3] & "*")
 
to search this either

a) put the phone numbers in a separate table, so they are normalised or
b) in your query have another field
allphones: phone1 & " " & phone2 & " "& phone3

then you can search the allphones field (either directly with binoculars, or with vba code)




Can i Have theVBA Code?
 
vba code is


requiredfield.setfocus

after that

docmd.findrecord etc

look at help for the various parameters of docmd.findrecord - works like the binoculars icon
 

Users who are viewing this thread

Back
Top Bottom