Mixed data types

teel73

Registered User.
Local time
Yesterday, 19:27
Joined
Jun 26, 2007
Messages
205
Can someone please tell me why this is happening?

I have 2 combo boxes. [cboSearchField] and [cboSearchValue]. The values in [cboSearchField] are (ReqID, subject, requestor). These are fields in my table. After update of [cboSearchField], [cboSearchValue] returns the values for the field selected. My problem is: If I select "ReqID" the first time from [cboSearchField], I am able to select my value which is an integer, then if I select any of the other two fields (which are text fields) and try to search for my value, I get an error ... "the value you entered isn't valid for this field."

I don't know what the problem is. Now if I select any of the text fields the first time then [cboSearchValue] works fine. I get no errors.

Anybody have any ideas why this is happening? I suppose it has something to do with the datatype of the control [cboSearchValue]
 
Is all this in a Table or a Form (Search Form)? what I mean is: are these Combo Boxes in a Table or a Form.

What appears to be happening is that you are supplying data to either a Table field or bound Form field (control) that doesn't like the Data-Type.

When dealing with Combo Boxes that contain multiple columns of data, be it in a Table or a Form, you need to ensure that the Bound Column of that Combo Box will match the Data-Type that the Control itself is bound to.

Also, when utilizing other columns within the Combo Box you need to use the Column property, for example:

cboSearchField.Column(0) contains the RegID value.
cboSearchField.Column(1) contains the Subject value.
cboSearchField.Column(2) contains the Requestor value

.
 

Users who are viewing this thread

Back
Top Bottom