Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid combo box not refreshing

Status
Not open for further replies.

pjohnston440

Programmer
Dec 18, 2008
7
US
Hi,

I'm using VFP 9 on a Vista machine.

My user needs to locate an existing customer when adding a record via a grid control. They would like the option of searching for the customer based on the customer number or name.

I have created two combo boxes with these properties:
- ControlSource = dailyact.custno
- style 2 - dropdown list
- sparse = .f.
- RowSourceType = field
- RowSource = curCust01.custno,name
and second combo box has
- RowSource = curCust02.name,custno

When I expand the combo1 list then arrow down I want the list in combo2 to change to the matching record as I highlight each record in the list. In the InteractiveChange of combo1 I'm trying to refresh combo2 but to no avail. Combo2 gets updated only when I leave combo1 not when I'm changing the values in combo1.

It appears to not be working because the controlsource (which is shared by both combo boxes) doesn't get updated until the user actually exits combo1. I'm not quite sure how to work around this.

Thanks,
Pete
 
Try doing the Refresh in the Valid method rather than the InteractiveChange and see if it helps.

Tamar
 
Hi Tamar,

Thanks, that works. I was hoping to get it to work on the interactivechange event but not a deal breaker.

Thanks for replying,
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top