Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Data Type Mismatch
Message
 
To
01/10/1997 08:52:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052613
Message ID:
00052655
Views:
34
When the error occurs check the debugger for the value of thisform.cboSurname.value. I get the impression that it hasn't been populated with the login name yet and is still NULL.

>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.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform