Type Mismatch Error with Empty Combo Box (1 Viewer)

jeffreyccs

New member
Local time
Today, 02:41
Joined
Nov 10, 2012
Messages
29
Hi

I have a form that is used to determine whether students have taken a particular test. The same form is used for all tests and uses a query to create the list of students still to take the test. Everything works fine until there are no student names left and then selecting the combo box causes a type mismatch error.

What I would like to inquire is how to handle error trapping for this problem, i.e. at what point and where should I add the error handling.

Any advice would be very welcome

Many thanks

Jeff
 

CJ_London

Super Moderator
Staff member
Local time
Today, 10:41
Joined
Feb 19, 2013
Messages
16,610
usual way would be before your code runs have a check for combo box null value or perhaps the combo listcount property for number of rows

if null or 0 then don't run the code, but perhaps display a message instead
 

jeffreyccs

New member
Local time
Today, 02:41
Joined
Nov 10, 2012
Messages
29
Hi

Thanks for your reply. I realised that the problem was of my own making.
I had been converting the database to permit multilingual operation and this required that all references in queries that previously were textual needed to be numerical and I missed one that threw up the error.

Many thanks for your help

Regards

Jeff
 

Users who are viewing this thread

Top Bottom