Treeview and Checkboxes

G

Guest

Hi,
I am using the first time Treeview (and checkbox in each line) in Access. I
have been able to figure out with example how it is done. Now I have a
question; How can I get data of the selected items in Treeview (where
checkbox is activated with a tick)? Any help is appreciated.

BR
MakeLei
 
K

ksivam

Dear MakeLei,
I too am novice to treeview. So how did you extraxt the data from the ticked
checked boxes
thanks
Regards
Ksivam
 
G

Guest

Hi ksivam,
Sorry for late answer, here we go... This is the main part of the code:
Dim i As Integer
Dim strSel As String
Dim lngSel As Long

If xTree.Nodes.Count > 0 Then
For i = 1 To xTree.Nodes.Count
If xTree.Nodes(i).Checked = True Then
strSel = strSel & "([YourTable].[YourColumn]) Like ""*" &
xTree.Nodes(i) & "*"" OR "
Else
End If
Next
End If

......
Error trapping and other is same as usual.

BR
Makelei
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top