Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I reference this Listbox item when source is a cursor
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How do I reference this Listbox item when source is a cursor
Miscellaneous
Thread ID:
00447519
Message ID:
00447519
Views:
50
I have search form with a listbox on it. The listbox is populated by a RowSourceType-SQL SELECT statement INTO CURSOR RowSource-cuRowSource. I can enter a partial search string and it finds my matching records. Then, I choose the item/record in the listbox and press the OK button. My listbox RowSource used to be "slister" which was an Array, but I changed it to an SQL SELECT statement and from INTO ARRAY to INTO CURSOR because ARRAY would not hold all of my SQL SELECT data.

Here is the code in my OK button which returned a record that matched the chosen line item from my listbox. How I do accomplish the same thing when I no longer have RowSource slister RowSourceType ARRAY to refer too? Now I only have RowSourceType = SQL SELECT statement and RowSource = the SQL SELECT statement including INTO CURSOR cuRowSource. Here is my code from my old search form.
mast_REC = recno()
IF cmdSearchSW = .T.
	seekid = ALLT(slister(THISFORM.lstSlist4.ListIndex,1))+ ;
		ALLT(slister(THISFORM.lstSlist4.ListIndex,2)) + ;
		ALLT(slister(THISFORM.lstSlist4.ListIndex,3))
	SELECT master
	SET ORDER TO TAG incident
	SEEK SEEKID
	mast_REC = recno()
ENDIF
thisform.release
Thanks for the help. I have the whole search form working, except for the OK button.
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