|
From: jmuirman on 4 Jul 2008 10:28 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
From: Dennis on 4 Jul 2008 10:34 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
From: jmuirman on 4 Jul 2008 11:48 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
From: John W. Vinson on 4 Jul 2008 15:42 On Fri, 4 Jul 2008 07:28:01 -0700, jmuirman <jmuirman(a)discussions.microsoft.com> 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]
|
Pages: 1 Prev: Simple update query question Next: Help to select record by checking multiple child items |