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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to look-up ID#



 
 
Thread Tools Display Modes
  #1  
Old July 4th, 2008, 03:28 PM posted to microsoft.public.access.queries
jmuirman
external usenet poster
 
Posts: 23
Default How to look-up ID#

In my query I use the following to look up a case number which is really the
Auto Number ID: Like [CASE ID#] & "*"

However, when I look up record 28, it finds all of the 2800s and not 28.

Any suggestions?

Thanks,

John
  #2  
Old July 4th, 2008, 03:34 PM posted to microsoft.public.access.queries
Dennis
external usenet poster
 
Posts: 1,222
Default How to look-up ID#

Take the & "*" off the end

"jmuirman" wrote:

In my query I use the following to look up a case number which is really the
Auto Number ID: Like [CASE ID#] & "*"

However, when I look up record 28, it finds all of the 2800s and not 28.

Any suggestions?

Thanks,

John

  #3  
Old July 4th, 2008, 04:48 PM posted to microsoft.public.access.queries
jmuirman
external usenet poster
 
Posts: 23
Default How to look-up ID#

Thanks Dennis

"Dennis" wrote:

Take the & "*" off the end

"jmuirman" wrote:

In my query I use the following to look up a case number which is really the
Auto Number ID: Like [CASE ID#] & "*"

However, when I look up record 28, it finds all of the 2800s and not 28.

Any suggestions?

Thanks,

John

  #4  
Old July 4th, 2008, 08:42 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How to look-up ID#

On Fri, 4 Jul 2008 07:28:01 -0700, jmuirman
wrote:

In my query I use the following to look up a case number which is really the
Auto Number ID: Like [CASE ID#] & "*"

However, when I look up record 28, it finds all of the 2800s and not 28.

Any suggestions?

Thanks,

John


The LIKE operator accepts wildcards - e.g. * matches any string, ? any single
character, # any numeric digit. If you want to search on an exact value, don't
use LIKE and don't use the wildcard "*". Just

[Case ID#]

would prompt you.

On the other hand, autonumber values are best kept "under the hood" and not
exposed to user view. Will your users actually have case 28, or case 315, or
case 446 memorized? Is there some other field (or fields) which are human
-meaningful? If so consider using a Form with an unbound Combo Box; this would
have the case number as its bound column, but the human-readable text as its
visible column. You could then use a criterion

=[Forms]![nameofform]![nameofcombo]

as a criterion.
--

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 01:31 AM.


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