How to look-up ID#

  • Thread starter Thread starter jmuirman
  • Start date Start date
J

jmuirman

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
 
Thanks Dennis

Dennis said:
Take the & "*" off the end

jmuirman said:
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
 
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.
 
Back
Top