Search for the customer's phone number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Can someone help me with the option that I am looking for.I got the data
abse of the customers.Is there any chance that I could search for the
customers phone number?
In the Find and replace option I could only look for the last name or the
first name, which means only text.
Thanks
 
bebe said:
Hi
Can someone help me with the option that I am looking for.I got the data
abse of the customers.Is there any chance that I could search for the
customers phone number?
In the Find and replace option I could only look for the last name or the
first name, which means only text.
Thanks

well, assuming all phone numbers are of the same format (i.e.
XXX-XXX-XXXX) this should be a fairly easy thing to accomplish. Create
a form and put a textbox and command button on it. ALso put a subform
that has the table with customer info on it (name, phone number, etc.)
name the text box something like txtPhoneNumber and name the command
button something like cmdPhoneNumber. then, use the followign code:

Private Sub cmdPhoneNumber_Click()
' Find the record that matches the control.
Dim stFilter As String

subform.FilterOn = False

stFilter = "[Phone_Number] LIKE '" & Me.txtPhoneNumber & "'"

subform.Filter = stFilter
subform.FilterOn = True
End Sub

make sure you change the part in the code where it says 'subform' to
say 'Form_your_subform_name" then this should work. if this is not
what you are looking for let me know and ill adjust my response
 
Hi
I am a newbie here.Is there any easier way then that?

Hi
Can someone help me with the option that I am looking for.I got the data
abse of the customers.Is there any chance that I could search for the
customers phone number?
In the Find and replace option I could only look for the last name or the
first name, which means only text.
Thanks

well, assuming all phone numbers are of the same format (i.e.
XXX-XXX-XXXX) this should be a fairly easy thing to accomplish. Create
a form and put a textbox and command button on it. ALso put a subform
that has the table with customer info on it (name, phone number, etc.)
name the text box something like txtPhoneNumber and name the command
button something like cmdPhoneNumber. then, use the followign code:

Private Sub cmdPhoneNumber_Click()
' Find the record that matches the control.
Dim stFilter As String

subform.FilterOn = False

stFilter = "[Phone_Number] LIKE '" & Me.txtPhoneNumber & "'"

subform.Filter = stFilter
subform.FilterOn = True
End Sub

make sure you change the part in the code where it says 'subform' to
say 'Form_your_subform_name" then this should work. if this is not
what you are looking for let me know and ill adjust my response
 
Hi
Can someone help me with the option that I am looking for.I got the data
abse of the customers.Is there any chance that I could search for the
customers phone number?
In the Find and replace option I could only look for the last name or the
first name, which means only text.
Thanks

Do you have a Form to view the data in this table? If not... create
one. Tables are of VERY limited utility. And how is your table
structured? Do you have a Phone field in the table? A PhoneNumber
field is (or should be) a Text field also - it's precisely as easy to
search a text Phone field for (800)555-1212 as it is to search a text
LastName field for Schmidt!

I'd suggest using a Form, and the form's "Query By Form" facility -
this will let you search any field or any combination of fields.

John W. Vinson[MVP]
 
Hi there
yes I do have the form of my customer date base which encludes the
customer's phone number.I would like to be able to search for the customers
by the phone numbers.Let's say customers call me and says:' my phone number
is 888-777-5555eg. can you check if I use your services'.Is there any way
that I put that number in the "find and replace' window search and I'll be
able to find it.
thanks
 
Hi there
yes I do have the form of my customer date base which encludes the
customer's phone number.I would like to be able to search for the customers
by the phone numbers.Let's say customers call me and says:' my phone number
is 888-777-5555eg. can you check if I use your services'.Is there any way
that I put that number in the "find and replace' window search and I'll be
able to find it.
thanks

Click into the phone number field.

Select Find and Replace from the menu.

Type the phone number.

Or; select Records... Filter... Filter by Form from the menu. Type the
phone number in the phone number textbox and filter.

I'm not sure what you're looking at on the screen, since I cannot see
your database - but ANY field in an Access database is searchable!


John W. Vinson[MVP]
 
thank you very much it worked.

John Vinson said:
Click into the phone number field.

Select Find and Replace from the menu.

Type the phone number.

Or; select Records... Filter... Filter by Form from the menu. Type the
phone number in the phone number textbox and filter.

I'm not sure what you're looking at on the screen, since I cannot see
your database - but ANY field in an Access database is searchable!


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top