Results 1 to 2 of 2
  1. #1
    bboudreau is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    1

    Muti Value Export to Excel

    Hi Guys



    Im working on a code now that exports to excel but i am having difficulties exporting the files where I am using the Multi Value option in access 2007. I know after resourcing that the multi value option is a pain but i have everything the way that i would like it in the form that i have created.

    The code i have is
    Dim Carriers As Recordset
    Dim Row As Integer
    Dim Col As Integer
    Dim ws As Worksheet

    Set ws = wb.Worksheets("ActiveProviders")

    Set Carriers = CurrentDb.OpenRecordset("select * from [qryactiveproviders]")


    Row = 2

    Do While Not Carriers.EOF
    Col = 1

    ws.cells(Row, Col + 0) = Carriers![Current Status]
    ws.cells(Row, Col + 1) = Carriers![Type]
    ws.cells(Row, Col + 1) = Carriers![Compliant]


    The Carriers![Type] will not work because it is multi valued, does anyone know the code to get the value from the access query in the way that access has it (ex. Red, Blue, Black)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Check this http://office.microsoft.com/en-us/ac...33722.aspx#BM7

    If it all possible, think will have to export the multi-value data separately. Or do a query for the multi-value field and query for the other fields, join those two queries and export that.

    I don't use multi-value fields so that is a wild guess.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-07-2011, 07:49 AM
  2. Export table to excel using excel template
    By allenjasonbrown@gmail.com in forum Programming
    Replies: 1
    Last Post: 06-27-2011, 02:10 AM
  3. Trying to export to Excel
    By BigCat in forum Programming
    Replies: 19
    Last Post: 05-19-2011, 01:49 AM
  4. Replies: 6
    Last Post: 05-04-2011, 06:17 PM
  5. Export to Excel
    By vaikz in forum Import/Export Data
    Replies: 3
    Last Post: 03-25-2009, 09:37 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