Re: Using * in an SQL Query

Tech-Archive recommends: Speed Up your PC by fixing your registry



No, that didn't work either. Any other suggestions? Thanks.

"JohnFol" wrote:

> Why not do
>
> Like "?X*"
>
>
> "Elaine" <Elaine@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:A4C98107-5289-4313-963A-E91D5FFBB55C@xxxxxxxxxxxxxxxx
> >I hope someone can help me with this. I inherited this database that I
> >need
> > to include its table into another database. Things have gone smoothly
> > except
> > when it comes to adding a new record into this table. The "Key" field is
> > made up of a letter code, the last digit of the fiscal year, and then a
> > three
> > digit number. Up until a few weeks ago the fiscal year digit came before
> > the
> > letter code, then the three digit number. The three digit number can be
> > repeated as long as it's not repeated with the same code letter. For
> > example
> > I might have a code "5B102" and "5C102". Since I need to keep this format
> > I
> > want to find the highest number in each letter group so I can increment
> > it,
> > then created a new Record Identifier based on the incremented number. I'm
> > trying to find the highest record using an SQL statement in VBA, example:
> > "Select [CANumber] frm [tbl FA] where [CANumber] like '" & Chr(42) & X &
> > Chr(42) & "'". I have done a lot of SQL statements using the wild card
> > this
> > way, but this time it doesn't like the "like" portion. I have gone into
> > the
> > Query Builder, created the query, and it ran fine. When I pasted that
> > into
> > my code, it won't work. Does anyone have any clues what I might be doing
> > wrong this time or why it won't work this way? Thanks.
>
>
>
.



Relevant Pages

  • Using * in an SQL Query
    ... to include its table into another database. ... made up of a letter code, the last digit of the fiscal year, and then a three ... letter code, ... Query Builder, created the query, and it ran fine. ...
    (microsoft.public.access.queries)
  • Re: Using * in an SQL Query
    ... I inherited this database that I ... > digit number. ... > letter code, ... > Query Builder, created the query, and it ran fine. ...
    (microsoft.public.access.queries)
  • How do I obtain decimals instead of rounding?
    ... I have a table in sheet 2 and am using a macro to convert a letter code ... into a digit. ...
    (microsoft.public.excel.misc)