Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox won't reset when record changes?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Listbox won't reset when record changes?
Miscellaneous
Thread ID:
00456527
Message ID:
00456527
Views:
57
Here is my code: (The listbox stays the same as the previous record's listbox) I haven't figure this one out for a couple of hours. Any clues? TIA!

My listbox is named lstAEDDisp_list on THISFORM.
SELECT aed_hist
SET ORDER TO date
GO TOP && Go to first record
scatter memvar memo
THISFORM.lstAEDDisp_list.DisplayValue = m.aedid

loRef = THISFORM
FOR ii = 1 TO loRef.ControlCount
	DO CASE
		CASE loRef.Controls(ii).BaseClass = "Listbox"
			loRef.Controls(ii).DisplayValue = ""
			loRef.Controls(ii).Value = ""
	ENDCASE
NEXT

SEEKID = ALLT(m.incident)+ALLT(m.patnum)+ALLT(m.patqty)
SELECT master
SET ORDER TO TAG incident
SEEK SEEKID
IF NOT FOUND()
	MESSAGEBOX("Master record NOT FOUND.",0+64,"AED History")
ELSE
	savmaster = recno()
ENDIF
IF SEEKID != savseekid
	SELECT aed_hist
	SET ORDER TO TAG incident
	SCAN FOR ALLT(aed_hist.incident)+ALLT(aed_hist.patnum)+ALLT(aed_hist.patqty) = SEEKID
		THISFORM.lstAEDDisp_list.AddItem(aed_hist.aedid)
	ENDSCAN
	WITH THISFORM
		.lstAEDDisp_list.ListIndex = 1
		.lstAEDDisp_list.Requery
		.lstAEDDisp_list.Refresh
	ENDWITH
	SEEK SEEKID
	IF FOUND()
		scatter memvar memo
	ENDIF
ENDIF
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