Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox contents not updating on form
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Listbox contents not updating on form
Miscellaneous
Thread ID:
00572133
Message ID:
00572133
Views:
58
I have a listbox on a form.

ControlSource is ATTS.

RowSource is IIF(atts.EXT="YES",allt(str(atts.seqno))+" "+atts.placed+" via "+atts.route+" Extubated - "+ atts.ext_reas,allt(str(atts.seqno))+" " +atts.placed+" via "+atts.route)

RowSourceType is Fields

The form init and prev and next buttons have this code -
* Find Attempts record that goes with Tube record
CREATE CURSOR atts;
(Ext C(3), Seqno N(2), Placed C(18), Route C(10), Ext_Reas C(12))

ATTS_CNT=0
SELECT attempts
SCAN FOR attempts.mast_id = tube.mast_id
	SELECT atts
	APPEND BLANK
	REPLACE atts.ext 		WITH attempts.ext
	REPLACE atts.seqno 		WITH attempts.seqno
	REPLACE atts.placed 	WITH attempts.placed
	REPLACE atts.route 		WITH attempts.route
	REPLACE atts.ext_reas 	WITH attempts.ext_reas

    ATTS_CNT=ATTS_CNT+1
	SELECT attempts
ENDSCAN
SELECT tube
All I want to know is how to update the listbox contents whenever it changes whether I am on this form or another form and return to this form.
When I leave the form and add some records to atts and come back to the form it does not update the listbox unless I press Prev or Next button first. Any ideas what's wrong? Is there are better way to do this? I tried THISFORM.lstTube_tries.Requery and DODEFAULT(), but then the listbox refreshes, but other controls on the form disappear. Thanks for the help.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Next
Reply
Map
View

Click here to load this message in the networking platform