Runtime error 13: Type mismatch

aman

Registered User.
Local time
Today, 15:01
Joined
Oct 16, 2008
Messages
1,251
Hi guys

Can anyone please help me to figure our this error.

Code:
Private Sub cboOdoc1_Change()
[COLOR=red]Call funct(cbodoc1, cboOdoc1, Label44)[/COLOR]
End Sub

Code:
Private Function funct(a As ComboBox, b As ComboBox, c As Label)
If a.Value = "Birth Certificate" And b.Value = "Original" And Cbodept.Value = "LSB" Then
c.Caption = "Returned"
end if
End function

Thanks
 
Last edited:
maybe try making the function public and not private?
 
I do not see any reason for a Type mismatch. What is the Cbodept field? Make sure that field does not have a control source as a field in your table which is defined as 'Number'. and you are trying to compare it to a string.
 
i suspect you need

c.caption, not c.value for the label
 

Users who are viewing this thread

Back
Top Bottom