Error 13: Type Mismatch

Tango59

New member
Local time
Today, 05:13
Joined
Nov 4, 2014
Messages
5
Hi,

I'm new to all this, so sorry if this seems trivial to the experts :o

I want to compare the choice in a combo box called cboChooseExamPaper with the content of a many-to-many join table called tblPilotGroundExam so that I can trap a repeated selection (so that the same exam can't be attempted twice). My problem is that I don't know how to compare the two. I get a type mismatch error with this: -

If Me.cboChooseExamPaper("[GroundExamID]") = DLookup("[GroundExamID]", "[tblPilotGroundExam]") Then 'If it's a repeat attempt

How do I do this properly without getting the error?

Many thanks for your help!
 
You are probably try to match a text string to a number
 
When not sure what you are doing, do it step by step, not everything at once.

If

something=somethingelse gives you an error then do

a=somethingelse
something=a

just to find out what causes your error.
 

Users who are viewing this thread

Back
Top Bottom