Re: Incremental search with numbers

Tech-Archive recommends: Fix windows errors by optimizing your registry




By the way, first are you certain that the "numeric" field is defined as a
numeric data type in the table?

Then, if you are trying to find the alphabetic character string starting
with the character "9" in a numeric field, you won't!

Take a look at wildcards (Access HELP) -- and consider something more like
(untested):

Like [Enter a digit] & "*"

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Goldar" <Goldar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AF50B7C9-3D85-44AE-AF59-0B4AC8EE60F9@xxxxxxxxxxxxxxxx
For example, i use my incremental search and I key in a letter (say 'A')
and
my program places it in a SQL query which uses a LIKE 'A*' to extract all
records whose key field starts with 'A'. If I then key in a 'B', my
program
creates a query which uses a LIKE 'AB*' to extract all records whose key
starts with the characters 'AB'. And so on, until I find the record I
want.
So far so good.

Now, if my table key field is a up to 6 digits (ex. '975321'), and I key
in
the first character (ex '9'), my query will try to extract records using
a
LIKE '9*' operator. Since the data in my table is numeric, it will never
match and no records will be selected. This is my problem. Do I need to
start
matching from the right rather than the left? Or, is there some way I can
get
the same matching effect as I do with alphabetic data?

Thanks...

"Jeff Boyce" wrote:

Could you provide an example of what you are trying, and how it is (not)
working the way you expect?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Goldar" <Goldar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E6D694D0-B07E-484C-8A79-1192F0496D21@xxxxxxxxxxxxxxxx
I have implemented an incremental search uses the LIKE operator in a
query
to
select aphabetic data from an alphabetic fields in a table based on
characters keyed in on my form. This works fine. The problem comes when
I
key
in numeric data on my screen and try to use the LIKE operator against a
number field in my table. I understand what's happening, but I don't
know
what to do about it. It seems that I need to be able to compare the
keyed
characters (left to right) against the same characters in my table, or
something like that. Does anyone have any ideas as to how to accomplish
this?

Thanks...





.



Relevant Pages

  • Re: Incremental search with numbers
    ... Microsoft Office/Access MVP ... "Jeff Boyce" wrote: ... my program places it in a SQL query which uses a LIKE 'A*' to extract ... starts with the characters 'AB'. ...
    (microsoft.public.access.formscoding)
  • Re: Truncated Memo field displayed on form
    ... 255 characters in any column that is in the combo box's RowSource query. ... My fields down to "Knowledge and Understandings" are fine. ... occurs with the "descriptor" field being truncated on my form. ...
    (microsoft.public.access.forms)
  • Re: Incremental search with numbers
    ... my program places it in a SQL query which uses a LIKE 'A*' to extract all ... starts with the characters 'AB'. ... "Jeff Boyce" wrote: ...
    (microsoft.public.access.formscoding)
  • Re: Incremental search with numbers
    ... Microsoft Office/Access MVP ... my program places it in a SQL query which uses a LIKE 'A*' to extract all ... starts with the characters 'AB'. ... "Jeff Boyce" wrote: ...
    (microsoft.public.access.formscoding)
  • Re: Incremental search with numbers
    ... "Jeff Boyce" wrote: ... my program places it in a SQL query which uses a LIKE 'A*' to extract all ... starts with the characters 'AB'. ...
    (microsoft.public.access.formscoding)