M
micfly
I have a command button next to an email text box. When clicked it opens up
an email with the email address filled in the "to:" field.
I use this on three different forms in my database. Two of them work but one
is giving me an error. Here's the code: (The compile error highlights
Email2)
On Error GoTo Err_Command264_Click
Dim stDocName As String
stDocName = "mailto:" & (Email2)
Command264.HyperlinkAddress = stDocName
Exit_Command264_Click:
Exit Sub
Err_Command264_Click:
MsgBox Err.Description
Resume Exit_Command264_Click
Email2 is the name of the key in the table and is the control source for the
text box. I can't figure this out. It's the same code for all three email
buttons. They are all named different. I've tried changing Email2 to a
different name (in the table and form) but I still get the same error. What
is wrong???
Thanks
an email with the email address filled in the "to:" field.
I use this on three different forms in my database. Two of them work but one
is giving me an error. Here's the code: (The compile error highlights
Email2)
On Error GoTo Err_Command264_Click
Dim stDocName As String
stDocName = "mailto:" & (Email2)
Command264.HyperlinkAddress = stDocName
Exit_Command264_Click:
Exit Sub
Err_Command264_Click:
MsgBox Err.Description
Resume Exit_Command264_Click
Email2 is the name of the key in the table and is the control source for the
text box. I can't figure this out. It's the same code for all three email
buttons. They are all named different. I've tried changing Email2 to a
different name (in the table and form) but I still get the same error. What
is wrong???
Thanks