Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Erratic combobox behavior
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01060242
Message ID:
01060455
Views:
21
Update: the code runs when clicking on a combobox item but does not if the number is typed in and the pointer exits the box. But the problem still exist if the code is in the lostfocus event. The combobox does not have a value if the user types in a value. So the method is never called.

That is correct. If you need to be able to add values to your combo on the fly, you need code like this in the Valid method:
IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
  lnLen = ALEN( This.aAccts, 1 ) + 1
  DIMENSION This.aAccts[ lnLen ]
  *** Populate the columns of the new array row here
  This.Requery()
  *** Now do what ever else you need to
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform