|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Generating Trees for DataI am hoping for a little help with a tool I am creating for generating Data Trees. I have a table which documents the update process for an access database in the following form: Master Slave -------------------------------------------------------------- None Autoexec Autoexec DeleteOldData DeleteOldData DeleteTable1 DeleteOldData DeleteTable2 Autoexec AddNewData AddNewData AddTable1 AddNewData AddTable2 The Master/Slave relationship determines the shape of the tree. For the example above it would look something like: Autoexec DeleteOldData DeleteTable1 DeleteTable2 AddNewData AddTable1 AddTable2 What I can't figure out is how to generate the tree... Would I have to stipulate a starting position such as the "Autoexec" or is there a way to get the program to work it out? Any help or recomendations are greatly appreciated. Thanks in advance, John If anybody has any useful website pointers I would also be very grateful...
Tried a Google search for "Visual Basic" "Data Flow" and "Trees" but it all seemed to be about dreating data flows for the VB Code rather than using the code to produce the flow for something else... "John Ortt" <JohnOrtt@Idontwantspamsonoreturnaddress.com> wrote in message <snip>news:4293017d$1_1@glkas0286.greenlnk.net... I've also just thought of a way of beginning the code..
If I look for the entry where the Master="None" and then assign the slave as the first master. I then increment the columns by one and loop through the code looking for all records which have the relevant master and write the slave name in the next column....and so on.... I think I am getting somewhere...If anyone has any better ideas please let me know before I spend days trying to code this (as my coding knowledge is basic at best). Thanks Show quoteHide quote > Master Slave > -------------------------------------------------------------- > None Autoexec > Autoexec DeleteOldData > DeleteOldData DeleteTable1 > DeleteOldData DeleteTable2 > Autoexec AddNewData > AddNewData AddTable1 > AddNewData AddTable2 > John Ortt wrote:
Show quoteHide quote > Hi there, I must be missing something, so forgive me for asking the most obvious question: have you looked at the TreeView control? What doesn't that do that you need?> > I am hoping for a little help with a tool I am creating for > generating Data Trees. > > I have a table which documents the update process for an access > database in the following form: > > Master Slave > -------------------------------------------------------------- > None Autoexec > Autoexec DeleteOldData > DeleteOldData DeleteTable1 > DeleteOldData DeleteTable2 > Autoexec AddNewData > AddNewData AddTable1 > AddNewData AddTable2 > > > The Master/Slave relationship determines the shape of the tree. > For the example above it would look something like: > > Autoexec DeleteOldData DeleteTable1 > DeleteTable2 > AddNewData AddTable1 > AddTable2 > > What I can't figure out is how to generate the tree... I must be missing something, so forgive me for asking the most obvious
question: have you looked at the TreeView control? What doesn't that do that you need? ?! - What TreeView control?... As I said I am an absolute noobie at VB. All I have learned is through macros in Excel and Access which I have then converted to VB (and some experimenting of my own with looping etc). I'll have a google for TreeView and let you know if I'm having problems. Thanks for the pointer :) Wow!!!
Just goes to show how you sometimes can't see the wood for the trees :) The TreeView command looks perfect, I have just looked at a page which is intended to be a tutorial but even the example data is in almost the same format as my own... http://people.revoledu.com/kardi/tutorial/VB/lesson06/Treeview.htm Thanks Jim, I think I should be able to progress on my own now :) Show quoteHide quote "John Ortt" <JohnOrtt@Idontwantspamsonoreturnaddress.com> wrote in message news:42932d69$1_1@glkas0286.greenlnk.net... > > I must be missing something, so forgive me for asking the most obvious > question: have you looked at the TreeView control? What doesn't that do > that you need? > > ?! - What TreeView control?... As I said I am an absolute noobie at VB. > All I have learned is through macros in Excel and Access which I have then > converted to VB (and some experimenting of my own with looping etc). > > I'll have a google for TreeView and let you know if I'm having problems. > > Thanks for the pointer :) > > > > -- > > Jim Mack > MicroDexterity Inc > www.microdexterity.com > > "John Ortt" <JohnOrtt@Idontwantspamsonoreturnaddress.com> wrote in message So are you also new to Windows itself or have you just never used Windows news:42932d69$1_1@glkas0286.greenlnk.net... > ?! - What TreeView control?... As I said I am an absolute noobie at VB. Explorer before? It's the poster child for the tree view control.... "Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message to be fair it's not like anybody should automatically know that there is anews:usX9uqHYFHA.2508@TK2MSFTNGP15.phx.gbl > "John Ortt" <JohnOrtt@Idontwantspamsonoreturnaddress.com> wrote in > message news:42932d69$1_1@glkas0286.greenlnk.net... > >> ?! - What TreeView control?... As I said I am an absolute noobie at >> VB. > > So are you also new to Windows itself or have you just never used > Windows Explorer before? It's the poster child for the tree view > control.... control available in VB that looks like the left-hand part of Explorer. It's not in the standard toolbox and could be easily overlooked in the common controls. -- Reply to the group so all can participate VB.Net: "Fool me once..."
Show quote
Hide quote
"Bob Butler" <tiredofit@nospam.com> wrote in message I can grant that it's not easy to find in the IDE, but my general point is news:OXQQ%23GIYFHA.3572@TK2MSFTNGP12.phx.gbl... >>> ?! - What TreeView control?... As I said I am an absolute noobie at >>> VB. >> >> So are you also new to Windows itself or have you just never used >> Windows Explorer before? It's the poster child for the tree view >> control.... > > to be fair it's not like anybody should automatically know that there is a > control available in VB that looks like the left-hand part of Explorer. > It's not in the standard toolbox and could be easily overlooked in the > common controls. that any programmer should be aware of standard controls, which the list view, tree view, etc. have become since the introduction of Windows 95 almost 10 years ago. I doubt many people decide "I want to become a mechanic" and then open up a car's hood and say "what's all this stuff?" (I know, I know, VB's ease-of-use tends to attract more entry-level folks than C. Doesn't mean I have to like it.) "Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message If the OP had said "I'm new to VB, where's the tree view control" then I'dnews:%23xIhfbIYFHA.1148@tk2msftngp13.phx.gbl > I can grant that it's not easy to find in the IDE, but my general > point is that any programmer should be aware of standard controls, assume he was not new to windows development. The impression I got from the OP was that he was new to coding in general (perhaps because the use of "noobie" makes me think "l33t" and probably very young). > which the list view, tree view, etc. have become since the That's pretty much the way I learn best. Jump right in and try things!> introduction of Windows 95 almost 10 years ago. I doubt many people > decide "I want to become a mechanic" and then open up a car's hood > and say "what's all this stuff?" > (I know, I know, VB's ease-of-use tends to attract more entry-level Strange, since that's what I always liked best about VB. It was open and> folks than C. Doesn't mean I have to like it.) inviting to the newbie and still powerful and challenging for more experienced developers. -- Reply to the group so all can participate VB.Net: "Fool me once..." Sorry if I offended Jeff. As Bob correctly guessed I am not a programmer by
training, I am actually an Aerospace Engineer. It just happens that for the last two years my projects have involved fairly heavy use of Microsoft Access and I have gradually come to find some things easier to do in VB than the standard Access Macros and Queries (despite a few teething troubles and very limitted knowledge). I am actually 28 years old, despite the 'l33t' speak... but I blame too much online gaming... I have been using computers since a very early age due to my father being in the industry but I am only just beginning to realise that VB has the capability to do just about everything within windows (provided you know how). For this reason I had no idea that the Windows Explorer Tree format was a standard piece of code which could be applied to anything.....but I'm glad I know now. I often find it far easier just to ask the good folks on the ng's when I have a problem rather than spend fruitless time trying to solve it entirely on my own. Sometimes you get a complete solution (such as in this case with the TreeView command) and other times it will just be a pointer in the right direction. Regardless it allows for a far steeper learning curve than a solo endeavour would. Please bear with the less experienced coders amongst us Jeff. Sometimes the stupid questions just need an equally stupid answer. All the best and thanks for the help guys, John |
|||||||||||||||||||||||