Microsoft Office Forums


Reply
 
 
news
Guest
Posts: n/a
 
      01-22-2004, 12:22 AM
Hi I want to open a database via visual basic 5
and SELECT DISTINCT field 'surname, FROM 'table' ORDER by 'surname'
and then close this database and put the results in a text file for further
manipulation
In plain language -- via vb, I want to extract from a table in ms access all
surnames sorted in alphabettical order with no repeats
I know I have to go to project /references or components and tick ole db but
I can`t find this
Error is cannot find file jeterr40.chm
help please and thanks in advance




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      01-22-2004, 11:31 AM
I can't help you with the specific error you're having, but let's work on
your SQL statement.

The word field isn't required in the statement, and you don't want the
quotes around the names.

SELECT DISTINCT surname FROM table ORDER BY surname

If your field or table names have embedded blanks (seldom a good idea!), you
need to surround the name with []:

SELECT DISTINCT surname, [telephone number] FROM [customer table] ORDER BY
surname


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"news" <(E-Mail Removed)> wrote in message
news:sLEPb.18184$(E-Mail Removed)...
> Hi I want to open a database via visual basic 5
> and SELECT DISTINCT field 'surname, FROM 'table' ORDER by 'surname'
> and then close this database and put the results in a text file for

further
> manipulation
> In plain language -- via vb, I want to extract from a table in ms access

all
> surnames sorted in alphabettical order with no repeats
> I know I have to go to project /references or components and tick ole db

but
> I can`t find this
> Error is cannot find file jeterr40.chm
> help please and thanks in advance
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004
>
>



 
Reply With Quote
 
 
 
 
Alex Ivanov
Guest
Posts: n/a
 
      02-20-2004, 06:45 AM
It is a not very helpful help file with error descriptions. It should be on
your Office CD.
Why do you need it at first place?
If you are talking about an MDB database, you may set references to either
ADO or DAO libraries and use Object Browser and IntelliSense to discover
their properties and methods. If you run into a problem, you may post here a
piece of code that does not work
and somebody will gladly help you fix the problem.

Alex.

"news" <(E-Mail Removed)> wrote in message
news:sLEPb.18184$(E-Mail Removed)...
> Hi I want to open a database via visual basic 5
> and SELECT DISTINCT field 'surname, FROM 'table' ORDER by 'surname'
> and then close this database and put the results in a text file for

further
> manipulation
> In plain language -- via vb, I want to extract from a table in ms access

all
> surnames sorted in alphabettical order with no repeats
> I know I have to go to project /references or components and tick ole db

but
> I can`t find this
> Error is cannot find file jeterr40.chm
> help please and thanks in advance
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT. The time now is 03:59 PM.
Microsoft Office Forums is not affiliated with Microsoft Corporation.


Welcome!
Welcome to the Microsoft Office Forums
 


Latest Threads
Remote help?
newman200 (04-13-2014, 12:54 PM)

Access command button help needed
MikeyL (04-06-2014, 07:01 PM)

Page number problem
satrah (04-06-2014, 10:48 AM)

3 line boarder
satrah (04-06-2014, 01:30 AM)

send from OneNote 2013 to PowerPoint 2013?
havping (04-01-2014, 09:50 PM)