B
bymarce
Why isn't this Dlookup working? I want this code to look up an email address
in he personel table based on the initials used in an unbound combo box.
When I run it it says "invalid use of null". Thanks.
Marcie
Private Sub Email_Work_Click()
Dim SendTo As String
SendTo = DLookup("Email", "Personel", "Initials = ""Me.fAssignedTo""")
Dim strWhere As String
If Me.FilterOn Then
strWhere = Me.Filter
End If
Debug.Print strWhere
Dim MySubject As String, MyMessage As String
SendTo = Mail
MySubject = Me.MLO
MyMessage = "Please complete the following tests for " & Me.MLO & "."
DoCmd.SendObject acSendReport, "rptWorkAssignments", , SendTo, , ,
MySubject, MyMessage, False
End Sub
in he personel table based on the initials used in an unbound combo box.
When I run it it says "invalid use of null". Thanks.
Marcie
Private Sub Email_Work_Click()
Dim SendTo As String
SendTo = DLookup("Email", "Personel", "Initials = ""Me.fAssignedTo""")
Dim strWhere As String
If Me.FilterOn Then
strWhere = Me.Filter
End If
Debug.Print strWhere
Dim MySubject As String, MyMessage As String
SendTo = Mail
MySubject = Me.MLO
MyMessage = "Please complete the following tests for " & Me.MLO & "."
DoCmd.SendObject acSendReport, "rptWorkAssignments", , SendTo, , ,
MySubject, MyMessage, False
End Sub