Re: EDI export

From: MGFoster (me_at_privacy.com)
Date: 08/27/04


Date: Fri, 27 Aug 2004 19:30:17 GMT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was mistaken in my first suggestion. It was, actually, my last
suggestion but I moved it to the top before posting. Must have gone off
on a tangent while thinking of possibilities.

To put each column in one line you'll have to use VBA & a recordset.
Loop thru the recordset & write each Field of the recordset to a text
file line.

Read up on Fields (DAO or ADO) in the Access VBA help file.

-- 
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQS+LsYechKqOuFEgEQLyagCcDoIEF7Ktcy46GiJfFk9meaTr3uoAnAsn
sreidc9rgLIZ59sVC3cZZHGU
=lW1R
-----END PGP SIGNATURE-----
Rick wrote:
> Maybe I am not understanding you correctly.  I know how to 
> export a text file from a query or table.  My problem is a 
> query or table is in rows AND columns.  I need to export 
> all data to a single column.
> 
> Example:
> John Doe works 10 hours on January 1, 2004.  He worked in 
> 3 areas.  This is the output I need.
> 
> John Doe
> January 1 2004
> Area 1
> 3 hours
> $10 per hour
> John Doe
> January 1 2004
> Area 2
> 3 hours
> $10 per hour
> John Doe
> January 1 2004
> Area 3
> 4 hours
> $10 per hour
> 
> It has to all be in a single column.
> 
> 
> 
>>-----Original Message-----
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>You can export the query results to a text file.
>>
>>1) Right-click the query in the db window & select Export 
> 
> from the pop
> 
>>up menu.  Follow the instructions on the export dialog 
> 
> box.
> 
>>2) Use VBA & TransferText method to do the same thing.
>>
>>OR
>>
>>You can loop thru the query's data w/ a Recordset and 
> 
> write to a text
> 
>>file, one line per field.  This will have to be done in 
> 
> VBA.
> 
>>-- 
>>MGFoster:::mgf00 <at> earthlink <decimal-point> net
>>Oakland, CA (USA)


Relevant Pages

  • Re: Data Changing Issue
    ... In the query, on the field line, I added the above expression. ... *if* you are in VBA. ... the data of your table from a recordset. ... I am running some queries using a form I created and for some ...
    (microsoft.public.access.queries)
  • Re: MS Access 2003 CrossTab Query Question using VBA--Item not fou
    ... VBA code runs & hits the break point the code will stop and the VBA ... Your code only reads the first row of the recordset. ... before running a crosstab ones does not know how many columns will appear and what their name will be..that is the natureof a crosstab. ... going to appear based on parameter criteria fed to an underlying query that a crosstab query is created from. ...
    (microsoft.public.access.queries)
  • Re: Data Changing Issue
    ... Can you post the SQL statement appearing in the SQL view of the query? ... *if* you are in VBA. ... the data of your table from a recordset. ... I am running some queries using a form I created and for some ...
    (microsoft.public.access.queries)
  • Re: SQL Vs Recordset
    ... Most of the DoCmd methods are simply vba handles to normal Access GUI ... DAO.QueryDef.OpenRecordset() will create a recordset from a pre-defined ... It is said that precompiling makes a query faster, ... > have created forms and report based on a Query which can be changed by ...
    (microsoft.public.access.modulesdaovba)
  • Recordset zum Schreiben öffnen
    ... Ich habe folgendes Problem mit Access 2002 und VBA: ... soll Daten in einer Tabelle ausgeben, ... sondern nur dieses Recordset in einem Formular ... Text1-7 werden im Query als leere Felder angefügt ('' AS ...
    (microsoft.public.de.access)

Loading