Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch - - HELP

Status
Not open for further replies.

dmon000

Technical User
Sep 9, 2003
79
US
The following code produces a type mismatch error when it calls the 5th line. The GET_RECIP function works fine in other forms, but in this form when it is followed by the "& AssignToEmail", a type mismatch occurs. If I comment out the "& AssignToEmail" it works fine. In a previous version of the code I had the CLEAN_EMAIL_ADDR following the "&" with the same type mismatch result. When I step through the code, everything works fine until the 5th line. Any suggestions?
THANKS!!!

Private Sub Command20_Click()
Dim Recipients As Variant
Dim AssignToEmail As String
AssignToEmail = CLEAN_EMAIL_ADDR(Combo15.Column(1))
Recipients = Split(GET_RECIP("test")) & AssignToEmail
SndMsg Recipients, "Form2 Test of the System", "", False
End Sub
 
try to debug with the following and tell me what you get. So you know column 1 is actually the 2nd column.

AssignToEmail = CLEAN_EMAIL_ADDR(Combo15.Column(1))
debug.print AssignToEmail
Recipients = Split(GET_RECIP("test")) & AssignToEmail
 
The Split function returns an array and you can't concatenate a string to an array.
So, what do you want to do ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya dmon000 . . .

Just what does your function [blue]GET_RECIP("test")[/blue] return?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top