dim strsql as string strsql="delete from table1" conn.execute strsql
Dim olApp As Outlook.Application Dim olMail As MailItemPrivate Sub Command1_Click() Set olApp = New Outlook.Application Set olMail = olApp.CreateItem(olMailItem) With olMail .To = "[email protected]" .Subject = "ADC Bug Report" .Body = "" .Display (1) End With End SubPrivate Sub Form_Load() Command1.Caption = "发送邮件" End SubPrivate Sub Form_Unload(Cancel As Integer) '退出Outlook olApp.Quit Set olMail = Nothing Set olApp = Nothing End Sub
"delete form table1 ":(
strsql="delete from table1"
conn.execute strsql
Dim olMail As MailItemPrivate Sub Command1_Click()
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "[email protected]"
.Subject = "ADC Bug Report"
.Body = ""
.Display (1)
End With
End SubPrivate Sub Form_Load()
Command1.Caption = "发送邮件"
End SubPrivate Sub Form_Unload(Cancel As Integer)
'退出Outlook
olApp.Quit
Set olMail = Nothing
Set olApp = Nothing
End Sub