Re: Using * in an SQL Query
- From: Elaine <Elaine@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 May 2005 06:51:02 -0700
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.
>
>
>
.
- References:
- Using * in an SQL Query
- From: Elaine
- Re: Using * in an SQL Query
- From: JohnFol
- Using * in an SQL Query
- Prev by Date: Re: Getting A Query List
- Next by Date: RE: Aggregate query help
- Previous by thread: Re: Using * in an SQL Query
- Next by thread: Exporting report to Excel
- Index(es):
Relevant Pages
|