G
Guest
Hi every1
I got a form based on a general query. i want to use a button to export data
from another query, but i want to limit the dates. *i.e. from 01-aug-04 to
30-aug-04.
Any ideas?
(my knoledge of VB is NONE)
i tried to export using the following but it just opened the excel.. and
nothing else
Private Sub SBTLog_Click()
On Error GoTo Err_SBTLog_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
DoCmd.TransferSpreadsheet acExport, 8, QSBTLog, "C:\my
documents\SBTLog.xls", False
Exit_SBTLog_Click:
Exit Sub
Err_SBTLog_Click:
MsgBox Err.Description
Resume Exit_SBTLog_Click
End Sub
Thanks
I got a form based on a general query. i want to use a button to export data
from another query, but i want to limit the dates. *i.e. from 01-aug-04 to
30-aug-04.
Any ideas?
(my knoledge of VB is NONE)
i tried to export using the following but it just opened the excel.. and
nothing else
Private Sub SBTLog_Click()
On Error GoTo Err_SBTLog_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
DoCmd.TransferSpreadsheet acExport, 8, QSBTLog, "C:\my
documents\SBTLog.xls", False
Exit_SBTLog_Click:
Exit Sub
Err_SBTLog_Click:
MsgBox Err.Description
Resume Exit_SBTLog_Click
End Sub
Thanks