![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a form with a treeview in it. I use the treeview to select the product I want, showing me data on the selected node. I am using code from a template to build my Treeview with Drag and Drop capabilities. So I don't understand all of the code. I would consider myself a moderate Access user. I am able to sort my parent nodes(Organization). I am even able to sort my child nodes(Products). However, the child nodes have names like "Product 3" and "Product 12". I want to sort the fields by their numerical value in the same way a number in a text field would be done by using Val(). In other words, I want my Child nodes(Products) to sort ascending like: Product 3 Product 10 Product 15 My question is first how to do that with a text field that has both text and numerical value. Secondly, where/when in my treeview code would I want to use it? I hope this gives enough information for the question I am asking. I know it is somewhat general, but I think that what I am asking is sort of general topic. Any help would be appreciated. Thanks. -WhathaveIdone? |
#3
| |||
| |||
|
|
With no detail about how you're populating your treeview, I can only offer general advice. *I'd create a query that sorts the data in the correct order (add a calculated field using the Val function and sort on it, possibly in conjunction with other sort fields for higher level branches), and use that, rather than unsorted data from a table, as the recordsource from which the tree is populated. HTH, Rob "WhathaveIdone?" <brasu... (AT) gmail (DOT) com> wrote in message news:98ce7a62-eb11-4a44-bcf2-8273b27efbd9 (AT) r5g2000prf (DOT) googlegroups.com... I have a form with a treeview in it. I use the treeview to select the product I want, showing me data on the selected node. I am using code from a template to build my Treeview with Drag and Drop capabilities. So I don't understand all of the code. I would consider myself a moderate Access user. I am able to sort my parent nodes(Organization). I am even able to sort my child nodes(Products). However, the child nodes have names like "Product 3" and "Product 12". I want to sort the fields by their numerical value in the same way a number in a text field would be done by using Val(). In other words, I want my Child nodes(Products) to sort ascending like: Product 3 Product 10 Product 15 My question is first how to do that with a text field that has both text and numerical value. Secondly, where/when in my treeview code would I want to use it? I hope this gives enough information for the question I am asking. I know it is somewhat general, but I think that what I am asking is sort of general topic. Any help would be appreciated. Thanks. -WhathaveIdone? |
#4
| |||
| |||
|
|
I have a form with a treeview in it. I use the treeview to select the product I want, showing me data on the selected node. I am using code from a template to build my Treeview with Drag and Drop capabilities. So I don't understand all of the code. I would consider myself a moderate Access user. I am able to sort my parent nodes(Organization). I am even able to sort my child nodes(Products). However, the child nodes have names like "Product 3" and "Product 12". I want to sort the fields by their numerical value in the same way a number in a text field would be done by using Val(). In other words, I want my Child nodes(Products) to sort ascending like: Product 3 Product 10 Product 15 My question is first how to do that with a text field that has both text and numerical value. Secondly, where/when in my treeview code would I want to use it? I hope this gives enough information for the question I am asking. I know it is somewhat general, but I think that what I am asking is sort of general topic. Any help would be appreciated. Thanks. -WhathaveIdone? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
I have a form with a treeview in it. I use the treeview to select the product I want, showing me data on the selected node. I am using code from a template to build my Treeview with Drag and Drop capabilities. So I don't understand all of the code. I would consider myself a moderate Access user. I am able to sort my parent nodes(Organization). I am even able to sort my child nodes(Products). However, the child nodes have names like "Product 3" and "Product 12". I want to sort the fields by their numerical value in the same way a number in a text field would be done by using Val(). In other words, I want my Child nodes(Products) to sort ascending like: Product 3 Product 10 Product 15 My question is first how to do that with a text field that has both text and numerical value. Secondly, where/when in my treeview code would I want to use it? I hope this gives enough information for the question I am asking. I know it is somewhat general, but I think that what I am asking is sort of general topic. Any help would be appreciated. Thanks. -WhathaveIdone? |
#7
| |||
| |||
|
|
I have a form with a treeview in it. I use the treeview to select the product I want, showing me data on the selected node. I am using code from a template to build my Treeview with Drag and Drop capabilities. So I don't understand all of the code. I would consider myself a moderate Access user. I am able to sort my parent nodes(Organization). I am even able to sort my child nodes(Products). However, the child nodes have names like "Product 3" and "Product 12". I want to sort the fields by their numerical value in the same way a number in a text field would be done by using Val(). In other words, I want my Child nodes(Products) to sort ascending like: Product 3 Product 10 Product 15 My question is first how to do that with a text field that has both text and numerical value. Secondly, where/when in my treeview code would I want to use it? I hope this gives enough information for the question I am asking. I know it is somewhat general, but I think that what I am asking is sort of general topic. Any help would be appreciated. Thanks. -WhathaveIdone? |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |