command buttons (1 Viewer)

D

DrRocket

Guest
hi, ive created a form in access in which when the command button is pressed, i need access to take all of that information and dump it into an excel worksheet, i tried using a macro to do that by using the transferspreadsheet command but that doesnt work, does anyone know what exactly i am doing wrong and can someone please tell me how to get a command button to do such an action?
 

jimbrooking

Registered User.
Local time
Today, 18:38
Joined
Apr 28, 2001
Messages
210
Check out the OutputTo Action (or the OutputTo method of the DoCmd object).
 

Talismanic

Registered User.
Local time
Today, 23:38
Joined
May 25, 2000
Messages
377
This should do it for ya:

DoCmd.TransferSpreadsheet acExport, 8, "TableName", "C:\FileName", True

All you need to do is use your table's name in place of "TableName" and then set your file name and path by modifying C:\FileName.
 

Users who are viewing this thread

Top Bottom