Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I refresh my combo to see a newly appended record?
Message
From
14/08/1999 21:31:44
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How do I refresh my combo to see a newly appended record?
Miscellaneous
Thread ID:
00253805
Message ID:
00253805
Views:
77
I want to force a combolist to refresh with the correct value when a command button appends a new record to a table buffered cursor.

Here's some important particulars.

mytable ordered on wonumber (not a unique key)
buffering pess/table

combo controlsource:none
boundto: .f.
rowsource: mytable.wono

Here's my ineffectual attempt to synch to combolist display with the newly appended record. In the click of the commandbutton:

append blank
thisform.mycombo.requery
thisform.mycombo.listitemid = 1
go top
set some record fields to default values
thisform.refresh

The above does put the table pointer at the right record (because of the go top), but what's displayed is the pre-append first wono in the list ... a value greater than 0 (which is what the value of wono is in the newly appended record).

In the debugger I notice that the requery does not increase the length of the list...a bad sign and the obvious reason that setting listitemid to 1 doesn't do what I was trying to do.

So, how do you force feed a newly appended record into the combo so that the display is refreshed correctly. Or more generally, if I move a table pointer for a table that's rowsourced to a combo (but not controlsourced), how do I force the combo's displayed value to refresh correctly?
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Next
Reply
Map
View

Click here to load this message in the networking platform