I have a simple block of code I was wondering if anyone could help me
translate (even if partially, or hints even) from VBA (in MS-Access) to
VB.net for a password form for email automation I'm emulating.
"frmEmailPassword" is the name of a password form evoked from my
mainform's button for emailing )"Email". Excuse the "ac's" as I'll be
migrating this away from Access.
Private Sub Email_Click()
If Forms!frmEmailPassword = "abracadabra" Then
On Error GoTo Err_Email_Click
DoCmd.SendObject acSendReport, "rptTruckingTotal", acFormatRTF,_
"Ed*******@jugger.com", "Da********@jugger.com",,_
"Jugger Truck Daily Report",, False
Exit_Email_Click:
DoCmd.Close acForm, "frmEmailPassword"
Exit Sub
Err_Email_Click:
MsgBox err.Description
Resume Exit_Email_Click
DoCmd.Close acForm, "frmEmailPassword"
Else
MsgBox "Incorrect Password!"
DoCmd.Close acForm, "frmEmailPassword"
End If
End Sub
Thanks!!