Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox with when clause issues
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01058638
Message ID:
01058676
Views:
11
Rodd

Can't really get my head round this. You sure the code shouldn't be in the .Valid() event, if you're reacting to user's input?

Terry

>I have a combo box with the following settings:
>
>.ControlSource = thisform.oAddrInfo.stprov
>.Sorted = .T.
>.Name = cboStProv
>.Style = 0
>.RowSource = "nwizprov.stprov"          && Table with alias of nwizprov
>.RowSourceType = 6
>.Format = '!'
>.BoundColumn = 1
>.ColumnCount = 1
>
>
>This allows the user to add provinces into the table if they don't exist in our list. This part works great.
>
>However, if I add the following clause to the When method:
>
return empty(this.parent.cboAddrId.Value)
>I start getting this weird result. If the user enters something into cboStProv that does not exist in the list and then leaves the cboStProv control, when the user re-enters that control, the text they've entered gets wiped out.
>
>If I remove the when clause, the text they entered remains there.
>
>Any ideas as to what is going on and how to fix this? I need the when clause but I need the text to stay there as well.
>
>P.S. I do not add the text they entered to the list until they're done with that form.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform