Type mismatch in expression error when opening form (1 Viewer)

mitchem1

Registered User.
Local time
Yesterday, 22:10
Joined
Feb 21, 2002
Messages
153
Access 2007. I get a Type mismatch in expression error when I try to open a form. It is a split form based on a very simple table, not a query. The form worked fine all week but obviously I've done something recently to trigger this problem. Any help would be greatly appreciated. Thank you.
 

mitchem1

Registered User.
Local time
Yesterday, 22:10
Joined
Feb 21, 2002
Messages
153
Only if the Switchboard counts. I just built it prior to all the problems.
 

boblarson

Smeghead
Local time
Yesterday, 20:10
Joined
Jan 12, 2001
Messages
32,059
Did you put anything in anywhere that starts with

=

and then something else (on that form that loads and the error occurs).
 

mitchem1

Registered User.
Local time
Yesterday, 22:10
Joined
Feb 21, 2002
Messages
153
No, I simply went to Create/Split Form and have added nothing extra. I was wondering about something else though. The table that the form is based on has a text field called County. On the form, I have the County field set up as a combo box that queries tblCounty. tblCounty has 2 columns, ID (autonumber) and CountyName (text). Could it be possible that the combo box is trying to store the ID (autonumber) into a text field and that causes the problem?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:10
Joined
Sep 12, 2006
Messages
15,692
that sounds like it

try temporarily removing the combo box source (possibly make it unbound)

the form should open normally, which would prove that is the problem.

You would certainly normally store the index value of a lookup (as a number/long) and not store the index value itself.

EITHER change the combo box so that the bound column is column 2 (the TEXT - but not the correct solution) -
OR change the table to store a numeric value - although you may not be able to do that if there is already text data in there.


This should make sense, as you seem to understand what is happeninig
 

Users who are viewing this thread

Top Bottom