473,386 Members | 1,606 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,386 software developers and data experts.

Distinguish 0 and O's in a string

I have a user input where i do a dlookup in a table-->field but there is a need to find the string even if the original field value contains 0 or O and also if the user input contains 0 or O.

ie - CODE1234 (entered with a numeric 0) should find CODE1234 when entered with a Alph 0)
Dec 30 '06 #1
3 1732
ADezii
8,834 Expert 8TB
I have a user input where i do a dlookup in a table-->field but there is a need to find the string even if the original field value contains 0 or O and also if the user input contains 0 or O.

ie - CODE1234 (entered with a numeric 0) should find CODE1234 when entered with a Alph 0)
'Before using the DLookup() Function, you can replace all occurrances of
'the SubString "C0de" with 'Code" as in the example:

Expand|Select|Wrap|Line Numbers
  1. Dim retString As String
  2.  
  3. retString = Replace("jjhyuC0de1234", "C0de", "Code")
  4. Debug.Print retString
retString will now return "jjhyuCode1234" so it can effectively be used with
DLookup() to return the proper result
Dec 31 '06 #2
Killer42
8,435 Expert 8TB
Quick question - what about other visually similar characters such as 1 (one) and l (lowercase "L")?

And one for the experts - can regular expressions be used in Access? Seems as though they might fit the bill for this kind of thing.
Jan 1 '07 #3
Absolutely correct, have now used nested repace() to solve problem for (0's o's) (l's 1's) - thanks.
Jan 1 '07 #4

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

Similar topics

5
by: John Bokma | last post by:
I want to use file_get_contents, which according to the documentation returns FALSE if it fails. However, it also fails if I read a file of 0 bytes in size. So I tried to use filesize to check...
1
by: Simon Willison | last post by:
Hi all, I've been experimenting with Python CGIs, and more recently mod_python. The FieldStorage class used by Python's cgi module and mod_python's utility library allows form data sent by a...
3
by: gogomei | last post by:
I have a text file like following and need to read out the names of each person. Since the only accurate info is there is a null line before starting a new name, I have written following code to...
5
by: Jon Maz | last post by:
Hi there, I am experimenting with the FileSystemWatcher object. I have set the NotifyFilter as follows: myFileSystemWatcher.NotifyFilter = NotifyFilters.Security | NotifyFilters.CreationTime...
10
by: DrPete | last post by:
Hi People Could anyone suggest to me the best way to distinguish treenodes? By this I mean I'm in a situation where I have a TreeNode that displays a number of categories and within those nodes...
4
by: amit | last post by:
Hi guys!I am trying to write a program which will segregate some selected keywords from a given file.The source code is given alongwith #include<stdio.h> #include<string.h> char...
3
by: Silvester | last post by:
I need to trigger some code when user drags and drops an entire folder onto my form. How can I distinguish between a folder drop and files dropped ? Can someone point me to code or a sample,...
17
by: Ron | last post by:
I want to write a program that will accept a number in a textbox for example 23578 and then in a label will display the sum of the odd and even number like this... the textbox containsthe number...
3
by: aksh4u | last post by:
I am prompting the user for name if he/she returns non empty string validate the input string it should contain only alphabets no special characters or numbers else if he/she...
3
by: Arndt Jonasson | last post by:
Let's say we have a schema (maybe expressed in XML Schema, but not necessarily so), that allows this instance document: <top> <txt>This is text</txt> <books> <book>Tarzan</book> <book>Harry...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.