halem2
Registered User.
- Local time
- Today, 05:26
- Joined
- Nov 8, 2006
- Messages
- 180
Hi folks:
VBA newbee. Running Access 2000. I have a Vendor form that shows a vendor at a time. I need to send an email to the vendor by either clicking on the vendor email box or a button on the form. I also need to pick the correct email address based on the vendor currently displayed.
This is what I have so far. It only picks the email of the first vendor regardless if I'm on a different one.
this is a code I found on the web and I'm trying to customize it to fit my needs:
Private Sub Label1555_Click()
On Error GoTo Err_cmdMailTicket_Click
Dim stWhere As String '-- Criteria for DLookup
Dim varTo As Variant '-- Address for SendObject
varTo = DLookup("[VendorEmail]", "[Vendor]")
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, , , , , -1
Err_cmdMailTicket_Click:
End Sub
thanks for any help you can give.
VBA newbee. Running Access 2000. I have a Vendor form that shows a vendor at a time. I need to send an email to the vendor by either clicking on the vendor email box or a button on the form. I also need to pick the correct email address based on the vendor currently displayed.
This is what I have so far. It only picks the email of the first vendor regardless if I'm on a different one.
this is a code I found on the web and I'm trying to customize it to fit my needs:
Private Sub Label1555_Click()
On Error GoTo Err_cmdMailTicket_Click
Dim stWhere As String '-- Criteria for DLookup
Dim varTo As Variant '-- Address for SendObject
varTo = DLookup("[VendorEmail]", "[Vendor]")
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, , , , , -1
Err_cmdMailTicket_Click:
End Sub
thanks for any help you can give.