Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Beginners combo box question
Message
 
To
05/05/2000 18:19:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00366803
Message ID:
00367345
Views:
18
>Another question.
>
>If in the InteractiveChange event of the combo, I want to change the record source of the grid. Should I call the grids refresh and in the refresh build my cursor based on the value of the combo box?
>
>Josh



First, I'd do this from the combo's valid, not the InteractiveChange. I've had too many problems trying to do things from the combo's InteractiveChange, because the combo's controlsource hasn't been updated at that point. The valid is fired as soon as you make a selection, so it works for almost anything you want to do.

Are you trying to change the contents of the grid's recordsource, or are you changing the cursor or table to a different table? It sounds like you want to do the former. In that case, you need to make sure you set the grid's RecordSource to '' before you rebuild the cursor, otherwise the grid gets confused and goes blank. That being said, where you do things is often a subjective call. Personally, I'd rather see a custom method that builds the cursor for the grid, which you can call from the grid's refresh, if appropriate, or anywhere else that needs to run the code.
Previous
Reply
Map
View

Click here to load this message in the networking platform