General information
Category:
Forms & Form designer
Title:
Combo Box Data Type Mismatch
I am encountering a 'Data Type Mismatch' error when I go into my form for the first time. Here is the information for my environment:
- in my database container I have a table called Staff. In the Staff table there is a field called kstaff which is char 6. I also have a primrary key on that field called kstaff;
- on my form I have a surname combo box. I want this combo box to be loaded by default with the name of the person who logged into my system. This works. The information for my surname combobox is as follows:
Bound Column : 2
Row Source : select surname,kstaff from staff order by surname into cursor csurname
Row Source Type: 3 - SQL Statement
Style: : 2 - Dropdown List
- the refresh method of my surname combo box is as follows:
DODEFAULT()
=SEEK(thisform.cboSurname.value,"staff","kstaff")
- in the watch window of the debugger at this line in my code I verified the following values:
thisform.cboSurname.value = "000003"
staff.kstaff = " "
During the init method of my form, at a thisform.refresh statement, the following error occurs:
Data Type Mismatch
Method: refresh
Line: 2 (which is the =SEEK... line)
I hope this is enough information to understand what I'm trying to do.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only