Re: Sorting field after getting distinct elements in access?
- From: "MikeD" <nobody@xxxxxxxxxxx>
- Date: Fri, 18 May 2007 16:01:14 -0400
"raman" <anusha.ramanujam83@xxxxxxxxx> wrote in message
news:1179514905.446392.4160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a field called Item and an autonumber field. i tried to get the
distinct number of items using the following query:
Set rcdset = Db.OpenRecordset("select distinct Items from tablename")
i want to sort this by autonumber.
so i have it as
Set rcdset = Db.OpenRecordset("select distinct Items from tablename
order by autonumber")
but this gives an error.
Any help?
Use the field *name* of your autonumber field.
It's not likely your column is named "autonumber". If it IS named
autonumber, you should rename it because AutoNumber is a special kind of
data type for Access tables and I can certainly see a field named that
causing problems. I'd be VERY surprised if Access permitted you to name a
field "autonumber" to be begin with.
--
Mike
Microsoft Visual Basic MVP
.
- References:
- Prev by Date: Re: Runtime Error 0 - What?
- Next by Date: Re: How to simplify long syntax
- Previous by thread: Sorting field after getting distinct elements in access?
- Index(es):
Relevant Pages
|