>I have a combobox who's dropdown list shows up as empty when it shouldn't.
>In the DropDown() method I have something like this:
>
>lnQResult = REQUERY(viewname)
>
>IF lnQResult <> 1
> Wait Window ('Requery problem')
>ELSE
> This.Requery()
> wait window ('Made it this far')
> This.Refresh()
> If This.ListCount = 0
> Wait Window ('empty list')
> EndIF
>EndIf
>
>I get the problem with this sequence of actions:
>
>1. Users clicks the down arrow - the view has a bunch of records, the user selects one.
>2. User takes focus off the combobox, then goes back to the combobox and clicks the down arrow.
>3. This time, there is only 1 record in the view, so that is what they select.
>4. User takes focus off the combobox, then goes back to the combobox and clicks the down arrow.
>5. This time the view has a bunch of records, but the list shows up empty! Plus the listcount is NOT equal to zero!!
>6. If they click the down arrow a second time, it works.
>
>I can repeat this 100% of the time. Does ANYONE have ANY idea on a work around for this? I've tried it with VFP7 and 8...same problem.
>
>Thanks!
Victor,
I have seen this type of behaviour with the combobox, listbox and grid when it related to a cursor / table. The cause, I believe, is the record pointer the control believes it should be on, no longer exist and it appears blank. I have set the pointer to the first record, refreshed the control, requeried, then refreshed the control again to get this behaviour to stop.
HTH,
Tracy