473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

only Zeros in telephone number field check

553 512MB
Hi

I have a text field for telephone number.

It is set to take atleast 10 digit and maximum 15 digits

How can i write a condition that would alert us if the 11th to 15th digits are only 0 (zeros) or only 1(ones) , 2, 3, so on ??

Thanks
Jul 9 '07 #1
2 1431
questionit
553 512MB
Hi

I have a text field for telephone number.

It is set to take atleast 10 digit and maximum 15 digits

How can i write a condition that would alert us if the 11th to 15th digits are only 0 (zeros) or only 1(ones) , 2, 3, so on ??

Thanks
Just to add that user can input 11, 12 , 13, 14 or 15 digits.
so if any number of digits after the 10th digit is '0'.. an alert should show
Jul 9 '07 #2
Killer42
8,435 Expert 8TB
I have a text field for telephone number.
It is set to take atleast 10 digit and maximum 15 digits
How can i write a condition that would alert us if the 11th to 15th digits are only 0 (zeros) or only 1(ones) , 2, 3, so on ??
Not sure I entirely understand what you're trying to achieve. But you might try a simple brute-force approach, something like this...
Expand|Select|Wrap|Line Numbers
  1. LastPart = Left$(strPhonenum,11)
  2. Select Case LastPart
  3.   ' Just list here all the combinations you want to disallow. Such as...
  4.   Case "11111", "22222", "33333", "44444", _
  5.        "55555", "66666", "77777", "88888", "99999", "00000"
  6.     ' Do a dummy-spit.
  7. End Select
Jul 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: samik_tanik | last post by:
I need to export a datagrid to Excel. I could did this. But, also need to keep the leading zeros in the data. How can I acheive this? Any help would be appreciated. -- Thanking you in...
1
by: mmmgood1 | last post by:
Help, I'm linking an excel spreadsheet in access and I have datafields with leading zeros (01021). When the file is linked in access, I get a #num in the field with the leading zeros. The zeros...
5
by: John Baker | last post by:
Hi:: I have 2 fields, an alphabetic and a number. I wish to combine them so that they form a field which has 5 positions in it. Number can be from 1 to 9999 Letter from A to Z I planned...
5
by: tpcolson | last post by:
I have a fairly large access 2003 table (200,000) records. Field 'X' is a text field, and contains either no value, 4 digits, 5 digits, or 6 digits. What I need to do is to add two zeros to the...
2
by: Teep | last post by:
I have a simple text box called txtrefnum, if the user enters a number length less than 9 characters long than I need to have lead zeros added to it. Does anyone know how to do this? I couldn't...
6
by: TN Bella | last post by:
I have a simple text box called txtrefnum, if the user enters a number length less than 9 characters long than I need to have lead zeros added to it. Does anyone know how to do this? I couldn't...
6
by: Brian Campbell | last post by:
HELP! SOS! I have a field that I'm trying to format within a query. The results from my field "Appointment.EMP_FILE_NB" give various numbers: (e.g.: 213 105523 125400 1245 834
3
by: brad.goldberg | last post by:
Hey All, I know this has been addressed in a few different conversations but none are exactly what I am trying to do, bear with me I am an access Newbie. Basically I have a form that assigns...
4
by: sreemati | last post by:
Hi, I have seen various online resources and tuturials. I ahve written a piece of code but it does not seem to work Problem defined: If not number entered (as not mandartory) ignore ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.