Transfer Form to Spreadsheet

B

benonibriggs1978

Hi,

Wondering if somebody can help me out, I am in a really desperate
situation to get this sorted. I have a form that draws records of from
the underlying table in a combo box. I want to be able to put a button
on my form that would export only what I have selected in the form.
The code I have set up (below) exports everything instead of just what
has been selected in my comb box:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "supplier
feed final", "C:\Test\spend switch board.xls", True
Exit_Command49_click:
Exit Sub
Err_Command49_click:
MsgBox Err.Description
Resume Exit_Command49_click
End Sub


That is just one part of my problem. The table that feeds into my form
isn't what I want exported. The data I need exported to excel is in
another table. They both have a unique field called [Vendor Name].

So basically what I want is when a vendor name has been selected in my
form that feeds from table "Supplier Feed Final", I want the data for
the [Vendor Name] selected exported to excel from a different table
called [Vendor Master].

Hope you can help me.Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top