Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a table through a command button on a form 1

Status
Not open for further replies.

dsmart16

IS-IT--Management
Joined
Nov 30, 2004
Messages
12
Location
CA
Help,

Hi there, I'd like to be able to export a table by clicking on a button that is on one of my forms.

Here's what I have:
tblSurveillance
frmReports
cmdExportTable
Exported Tables (a folder on my hard drive)
SurveillanceExported.mdb (a blank database in the Exported tables folder

So I am looking at the frmReports form, and when I click on cmdExportTable I'd like to have it export the tblSurveillance table the the SurveillanceExported.mdb database in the Exported Tables folder on my hard drive.

If you need any more information please let me know, thanks for all your help.

Dave
 
Hi
Have you looked at the TransferDatabase Method? You could add (for example):

Code:
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\Exported Tables\SurveillanceExported.mdb", acTable, "tblSurveillance", "tblSurveillance", False

to the ONClick event of cmdExportTable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top