TreeView last possible selection

J

John J.

My 3 level deep treeview (MSComctlLib.TreeCtrl.2) is built from a table (3
fields). Sometimes, in one record only the first field has a value, but
other times 2 fields or all three fields have values. The threeview works
fine.

However, I need to determine if the user has chosen the 'most upper right'
filled field of the record. So if field values are:
Fld1 Fld2 Fld3
A B C
A B X
K
and the user presses the B, I need to make clear that he hasn't made an
unique selection yet and that he has to make a choice one layer deeper.

Is this somehow possible?

Another question about this treeview control. Is it possible to store a
hidden ID-number somewhere, as that's the value I would like to return from
this form. Or is the best way to do a Dlookup on the 1-3 values in the
sourcetable?

Thank you,
John
 
T

Tom van Stiphout

Check with the help file: the Node object has a Children property that
returns the count of children.

I would design the code such that the PK is used as the Key for each
node.

-Tom.
Microsoft Access MVP
 
J

John J.

Thanks. I will look for the Help file, since it's not included by default.
John
 

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