export

Option Explicit
Dim db As Database

Private Sub Command1_Click()
Command1.Enabled = False
db.Execute "SELECT * INTO [dBase III;DATABASE=C:\].[authors.DBF] FROM [authors]"
Command1.Enabled = True
End Sub

Private Sub Command2_Click()
Command2.Enabled = False
db.Execute "SELECT * INTO [Text;DATABASE=C:\].[authors.TXT] FROM [authors]"
Command2.Enabled = True
End Sub

Private Sub Command3_Click()
Command1.Enabled = False
db.Execute "SELECT * INTO [HTML Export;DATABASE=C:\].[authors.HTM] FROM [authors]"
Command1.Enabled = True
End Sub

Private Sub Command4_Click()
Command1.Enabled = False
db.Execute "SELECT * INTO [Excel 8.0;DATABASE=C:\authors.XLS].[authors] FROM [authors]"
Command1.Enabled = True
End Sub

Private Sub Form_Load()
Command1.Enabled = False
Set db = Workspaces(0).OpenDatabase(App.Path & "\biblio.mdb")
Command1.Enabled = True
End Sub

你可能感兴趣的:(Export)