Query to a text file 
Author Message
 Query to a text file

Hi, does anyone know how to direct the results of a query to a standard
ASCII text file?  thanks



Fri, 10 Mar 2000 03:00:00 GMT  
 Query to a text file

 You could For/Next thru the recordset and write each record to a file...or
the clipboard...etc

John



Sat, 11 Mar 2000 03:00:00 GMT  
 Query to a text file

Jan;
Search the On-line books for list and you will see an example for Unbound
list box.  It shows how to loop through a recordset additem to a list box.
You can use it as an example to loop and send to a file.

        sCatDatabase = App.Path & "\macro32.mdb"
        datCategory.DatabaseName = sCatDatabase
        Dim Rs As Recordset
        datCategory.RecordsetType = 1         ' Dynaset-type Recordset.
        datCategory.RecordSource = "SELECT Name FROM qryCategory"
        datCategory.Refresh                       ' Open the database.
        cmbSearchID.Clear                      ' Clear out the list box.
        Set Rs = datCategory.Recordset

        Do While Rs.EOF = False
            cmbSearchID.AddItem Rs(0)      ' Add the field.
            Rs.MoveNext                     ' Move to the next field.
        Loop



Quote:
> Hi, does anyone know how to direct the results of a query to a standard
> ASCII text file?  thanks



Fri, 17 Mar 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Exporting Acces2K table (or query) to separate text files

2. Write a query to a text file

3. Export Access97 query to a text file

4. Export query results to text file

5. Exporting JET 3 Query Results to Text file in VB4??

6. How To: Run SQL query against a text file?

7. Use parameter Query to export to multiple text files

8. Read/Write from list of queries to text file

9. Output query to text file with 3lines per record

10. text file reading query

11. text file reading query

12. Querying text files into a report

 

 
Powered by phpBB® Forum Software