query by phone number

  • Thread starter na via AccessMonster.com
  • Start date
N

na via AccessMonster.com

I need help. i am trying to query by phone number.I am prompting the user
to enter the phone number. Can this be done? what format should the user
enter the format, (###)###-#### or ######-####?
Should I change the data type to number?

Data Type: Text
Input mask: \(999") "000\-0000;0;" "
 
J

John Vinson

I need help. i am trying to query by phone number.I am prompting the user
to enter the phone number. Can this be done? what format should the user
enter the format, (###)###-#### or ######-####?
Should I change the data type to number?

Data Type: Text
Input mask: \(999") "000\-0000;0;" "

A phone "number" should always be stored as text - you'll never do
calculations with it.

Since your Input Mask has the 0 operand, it's actually storing the
parentheses and hyphens in the Phone field in your table; in order to
match, the search criterion needs the same punctuation in the same
place. I'd suggest using a Form to prompt for the criteria, and use
exactly the same input mask on the (unbound) criteria textbox as you
have in data entry. Use a criterion in your Query of

=[Forms]![YourSearchFormName]![YourTextBoxName]


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

Top