Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting number of alphanumeric values in a field

Status
Not open for further replies.

hartwell

Technical User
Apr 18, 2005
80
GB
could you please point me in the right direction for counting the number of alphanumeric value's in a field?,

Had a good search through the forum but no luck so far,

it is to see if the value entered in the search box is either a search for the surname or postcode, any other ideas on how this could be done would be great.
 
Making an assumption that the postal codes are from the United States, maybe you could try the IsNumeric function in VBA? so if IsNumeric is true, treat as postal code, otherwise, treat as last name?

This might take more thinking if the postal codes are like those in Canada and aren't purely numeric. . .
 
Found my own solution lol....

For x = 1 To Len(strSearchValue)
If IsNumeric(Mid(strSearchValue, x, 1)) = True Then GoTo searchPostCode

Next
 
Hi!

Just make the user tell you which one. Add a frame with two radio buttons. One button will be to search by name and the other to search by postal code. Before you start your search just check the value of the frame to see which one has been clicked.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
wanted it to be as simple as possible for the user as they arnt the brightest of people :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top