A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Finding Numerics in a field



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 05:26 PM posted to microsoft.public.access
Sam[_20_]
external usenet poster
 
Posts: 27
Default Finding Numerics in a field

What would be the best formula to use to find out if a field has
numbers in it.

example:

JOHN SMITH2
JOHN 9 SMITH
JOHN 201 SMITH

Thanks
  #2  
Old April 22nd, 2010, 05:47 PM posted to microsoft.public.access
fredg
external usenet poster
 
Posts: 4,386
Default Finding Numerics in a field

On Thu, 22 Apr 2010 09:26:23 -0700 (PDT), Sam wrote:

What would be the best formula to use to find out if a field has
numbers in it.

example:

JOHN SMITH2
JOHN 9 SMITH
JOHN 201 SMITH

Thanks


As the criteria on that field in a query:

Like "*[0-9]*"

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old April 22nd, 2010, 09:46 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Finding Numerics in a field

On Thu, 22 Apr 2010 09:26:23 -0700 (PDT), Sam wrote:

What would be the best formula to use to find out if a field has
numbers in it.

example:

JOHN SMITH2
JOHN 9 SMITH
JOHN 201 SMITH

Thanks


A criterion of

LIKE "*#*"

will find all records containing one or more digits.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 OfficeFrustration.
The comments are property of their posters.