Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox Problem
Message
From
28/04/1998 03:37:58
Steve Camsell
Windmill Associates
Bath, United Kingdom
 
 
To
27/04/1998 15:17:20
Shane Gilbert
Oklahoma State Department of Education
Norman, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00095225
Message ID:
00095323
Views:
23
Shane,

Is the Valid() firing when there is only one entry in your combo? You should check this out first before proceeding. If it isn't, then perhaps in the Init() of the combo you could add:

THIS.ListIndex = 1
THIS.Valid()

This will ensure that Valid fires. In a situation such as yours, I often use SQL as the RowSource. This means that you can use BoundColumn and BoundTo to tie the Value of the combo to the key of the datasource. Alternatively, you can SELECT INTO CURSOR in your SQL statement and reference the cursor i.e. SEEK(cursorname.keyfeildname).

Anyway, that's just my personal opinion. I hope that this helps to solve your problem.


>I am using a Combobox with recordsource type set to fields. I set a filter on the table to show just the records I want. If there are more than one records shown everything works fine, but if there is only one record the =seek(this.value) in the Valid does not work. If I first look up customer that has several orders, select one from the combobox and then select a customer with only one order it will work OK. Why does this behave this way?
>
>Shane Gilbert
Steve Camsell
Development Consultant
Steve.Camsell@Windmill-DBM.Co.Uk
Previous
Reply
Map
View

Click here to load this message in the networking platform