Results 1 to 2 of 2
  1. #1
    jle0003 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    60

    Query Export formatting issues


    I have a table, let's call it tblRegion. It looks like this:

    RegionID (PK)
    RegionName

    I have another table, tblState. It looks like this:

    StateID (PK)
    RegionID (FK)
    StateName

    In the lookup properties for tblState.RegionID, I have the follwing selections:

    Display control: Combo Box
    Row Source Type: Table/Query
    Row Source: SELECT [tblRegion].[RegionID], [tblRegion].[RegionName] FROM tblRegion;
    Bound Column: 1
    Column Count: 2
    Column Widths: 0";1"

    I have a query that returns the RegionID and StateID based on some other criteria. When I run the query in Access, the output looks like this:

    EventID EventDate RegionID StateID
    01 7/31/2013 Southeast AL
    02 8/01/2013 Northeast MA

    But, wen I export the query results in a text file (comma-delimited values) I get:

    EventID,EventDate,RegionID,StateID
    01,7/31/2013,3,1
    02,8/01/2013,2,4

    I want:

    EventID,EventDate,RegionID,StateID
    01,7/31/2013,Southeast,AL
    02,8/01/2013,Northeast,MA


    How do I get the export to display the RegionName and StateName (like it does in the Access query output)? When I select "Export data with formatting and layout" it puts several dashes and vertical bars in my text file and I only want comma-delimited values (like above).

    Please help!

    Thanks!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You need to add the lookup table as part of your query joining it to your main table. Display the lookup values and not the values in your main table. If you are running a report and exporting that, make sure that the query is used as a record source and not your main table.

    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-08-2013, 08:50 AM
  2. Number formatting issues in VBA.
    By Fish218 in forum Forms
    Replies: 1
    Last Post: 03-09-2012, 12:34 PM
  3. Export to excel (File Name issues)
    By fpmsi in forum Import/Export Data
    Replies: 6
    Last Post: 09-22-2011, 02:09 PM
  4. Rounding and Formatting Issues
    By billgyrotech in forum Access
    Replies: 3
    Last Post: 08-10-2011, 02:27 AM
  5. Export Formatting
    By arthura in forum Import/Export Data
    Replies: 0
    Last Post: 02-20-2009, 08:44 AM

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