Question Help filter subform with treeview control

josephbupe

Registered User.
Local time
Tomorrow, 01:37
Joined
Jan 31, 2008
Messages
247
Hi,
I still can't do much alone with ms access coding. I use many samples posted here, thanx to UA members.

Something am working on is a database for law enforcement where i work and noticed that there's need for the treeview control to filter records in the subform frmPersonsSub based on Offence category (which is the parent node) and/or the offence name (child note).

The sample attached works only with MS Access 2007 and probably higher. This is so because the frmPersonsSub has a unbound textbox and code that allows viewing images in a continuous form mode. For that reason I could not set record source of the subform to a query because that tempered with viewing images in a continuous form mode.

What i want is to be able to filter the subform frmPersonsSub to show only persons related to the selected offence category (parent node) and/or offence name (child note).

Kindly help me with this.

Joseph
 

Attachments

You may already have seen the Tree View samples here if not they should help you achieve your goal.
 
Hi,

Thank you so much for pointing me to that link. It was so resourceful and as a result I took some time to go through most of those posts and I have decided to change my approach.

In the attached sample, I have opted to only list names of persons in a tree control as opposed to the previous where I was listing offences in the tree control.

However, there are a few areas I want to handle to finalise my project:

First, the root node is collapsing automatically each time the form opens. I want the reverse when the form opens, but that should not expand the parent root.

Second, I want the data (LastName etc) in the form to correspond with the parent node clicked. Fortunately, the click action on the

Please, see attached sample of my project.

I will appreciate.

Joseph
 

Attachments

Firstly I must say I've any tinkered around the edges with the treeview control, so it is possible that you have a better understanding of how they work than I do :o

For you first problem this article may help you.

With the other problem, all I would be doing would be to pull apart the sample in the first link I posted and trying to figure out what makes it tick. Good luck and have fun :)
 
Thanx again. I'll have a look in both places.

Stay well.

Joseph
 

Users who are viewing this thread

Back
Top Bottom