Reusable Form Part II

  • Thread starter Thread starter Curt
  • Start date Start date
C

Curt

Sorry for starting a new thread, but since the first part
worked I figured noone would revisit the thread.

Thanks to Allen the form works like a charm. However, my
next part is that if I select the individual button on
frmEmail I want it to grab the individual's email on the
form and create an email. Since I will be using this form
with several forms how do I go about doing this? Here is
where I started, but it gives me my statement in the TO
box rather than the email. Also, I need to make sure
there is not a null value before it proceeds so I need to
somehow trap it.

Dim strTo As String
strTo = "Select txtEmail FROM Forms(Me.OpenArgs)"
DoCmd.SendObject , , acFormatRTF, strTo, , , , , True

Any further help would be appreciated.
 
Stupid me never mind.

Dim strTo As String

If Forms(Me.OpenArgs).[txtEmail] = " " Then
strTo = Forms(Me.OpenArgs).[txtEmail]
DoCmd.SendObject , , acFormatRTF, strTo, , , , , True
Else
MsgBox "Individual does not have Email listed",
vbCritical, "No Email Listed"
End If

But I think there still should be a better way.
 
Back
Top