Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Using your dB from Post #3, I exported a record after writing code to sent the data to a text file from your query.

    *** Start Order ***
    EXTERNALORDER1: PO83160


    DATEEXTERNAL1: 06/8/20
    ADDRESSCOMP: name name
    ADDRESS1: xxx COUNTY RD G
    ADDRESSCITY: BRYAN
    ADDRESSSTATE: OH
    ADDRESSZIP: 43506
    ADDRESSCOUNTRY: US
    NOTESTOACCOUNTING: IMPERIAL PO83160
    SHIPMETHOD: UPS THIRD PARTY
    *** End Order ***
    *** Start Customer ***
    EXTCUSTOMERID: 961
    COMPANY: IMPERIAL
    *** End Customer ***
    *** Start Product ***
    PARTNUMBER: CA2015025-M
    Quantity: 1
    SIZE1: 0
    SIZE2: 0
    SIZE3: 1
    SIZE4: 0
    SIZE5: 0
    SIZE6: 0
    *** End Product ***
    IDORDERTYPE: 21


    Obviously, the dB I downloaded is not your "real" dB since there are fields missing in the dB you posted. So I used the SQL from the saved query "ORDERQRY" and added a WHERE clause.
    While testing the code, there was/is a problem with the calculation for "Size6" - it returns #Error, so I removed the calculation and substituted a 0.

    You do not have a PK field so I used the field "EXTERNALORDER1" to select the record to export. What should happen if you have 2 or more records with the same "EXTERNALORDER1"?
    Any field where the data is NULL/missing/Blank is NOT written to the text file.

    Just playing around to show have you can use VBA to write to a text file.


    Is this close to what you want?

  2. #17
    DWATS is offline Novice
    Windows 10 Access 2007
    Join Date
    Jun 2020
    Posts
    9
    Hi SSANFU, Thank you for the VBA example. Yes, I like this approach and will play with it this weekend.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-13-2017, 02:37 PM
  2. Replies: 1
    Last Post: 07-23-2016, 09:08 PM
  3. Design Help for Novice Access User
    By jk1809 in forum Database Design
    Replies: 3
    Last Post: 08-07-2012, 10:20 AM
  4. Simple export for the Access novice
    By VictoriaAlbert in forum Import/Export Data
    Replies: 4
    Last Post: 06-15-2011, 01:33 AM
  5. Access Novice - Looking to learn from scratch.
    By Javaman in forum Database Design
    Replies: 1
    Last Post: 03-13-2010, 08:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums