Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Woes
Message
From
14/05/1998 11:15:46
 
 
To
14/05/1998 11:10:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00099436
Message ID:
00099437
Views:
21
>I have a form with a 2 page pageframe. On page 1 I have the Parent Table information. On page 2, I have the child table fields.
>I have a combobox on page 1 that is tied to the parent table. This way, the user can do a quick select to bring up the desired record.
>
>My problem is this. After I add a new record to the parent and click Save, I set the visible property of the combo back back to .T. and refresh the form. However the combo box displayvalue & value are blank. I can click in the combo box and see the new value, but when I select it, the combo box returns the previous record. If I click on Page 2, then back to page 1, then click the combo box I can then select my new entry.
>
>I found a work around in which I can control the mouse click to click each of the pages then set the focus to the combo box and set it to the last value, but I know this isn't the proper way to do this.
>
>This is a strange problem. Does any one have any ideas?
>
>Thanks,
>
>Scott

Two things:
1. Any time you change (add new record) in Combo.Rowsource you should issue Combo.Requery to bring new value (if you want) to the list portion of the combo.
2. To show new value/displayvalue in the text portion of combo you should either set record pointer on needed record and issue Combo.Refresh (in case of bound combo) or set these values programmatically Combo.Value="...." (in a case of unbound combo).
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform