Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Question
Message
 
To
31/03/2000 03:54:10
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00352936
Message ID:
00353222
Views:
17
<snip>

>>> I have a combo with incremental search on a form. In the interactive change event, I have this code: <<
>
>As Barbara already told you, the Valid method is a better place for this code because it fires only when the user has actually selected something from the combo box. InteractiveChange fires on every keystroke.

The valid method worked great - especially after I removed the setfocus()statement to keep it from jumping to the next field everytime I pressed a key (hey, it was late!)

>How is your combo box set up? It look like it is unbound and is only being used for navigating the Document table. If this is the case, you can just set the combo up with a RowSourceType of 6-fields and set its RowSource to Document.l_cSeekDoc. If this is a numeric value, then you have to set the combo's BoundTo property to true. Then, whenever you make a selection in the combo, it will automatically move the record pointer in the Document table. So if txtrmrev and txtrmname are bound to the fields in the Document table, all you have to do id refresh them and they will display the appropriate value.

All three fields (cboRMcode, txtrmrev and txtrmname) are bound to a table - I should have mentioned it. The form I am working on is for supplier deviations. The raw material spec (listed in Document) is selected and the code, title and revision are stuck into the deviations table for posterity - we have to keep track of the title and revision of the document that was deviated even after the document info is changed down the road. Indeed, it is a RowSourceType 6.

>Just mu $.02 - doing it the way I just described means you can do it with less code. IMHO, less code means fewer bugs ;-)

Oh yeah - no disagreement here! Thanks to you, Nadya and Barbara for the help :)
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform