-
Topic
-
Hi,
Thank you for pointing me in the right direction regarding equivalents between selectboxes and listviews. I have the following code based on one of your examples in the forum:
Sub Main(Client, GWEvent)
dim I
dim iGuidelines, iGuideline
dim oItem
dim userid
userid = groupwise.account.owner
‘ Initialize a 3-dimensional array of data.
iGuidelines = Array(Array(“Chronic Disease”, “1a”, “Annual community wide education campaign”), _
Array(“Chronic Disease”, “1b”, “Community Events”), _
Array(“Chronic Disease”, “1c”, “Coalition”), _
Array(“Chronic Disease”, “1d”, “Telephone/Internet”), _
Array (“Chronic Disease”, “1e”, “Variety of Channels”))‘ This assumes a form MainForm with TRzListView named
‘ ListView which has three columns defined.
with CDIP_FRM.ListView
.Column(0).Caption = “Program”
.Column(1).Caption = “Guideline #”
.Column(2).Caption = “Guideline”
.Items.BeginUpdate
.Items.Clear
for I = 0 to UBound(iGuidelines)
iGuideline = iGuidelines(I)
set oItem = .Items.Add
oItem.Caption = iGuideline(0)
oItem.SubItems.Add(iGuideline(1))
oItem.SubItems.Add(iGuideline(2))
next
.Items.EndUpdate
end with
CDIP_FRM.SHOWMODAL
End SubWhen the user places a check beside one of the guidelines I only want to write the guideline # out to the database. I have tried itemindex, item.checked, itemselected property and used a for loop etc but obviously missing something. This is a static list and the guideline # is the key to the guidelines table and more or more guidelines can be used.
Thanks, I appreciate your help. You are very prompt and efficient with your responses and I just wanted to say thank you. I enjoy the product and the benefit of excellent support.
- You must be logged in to reply to this topic.