Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recursive form for recursive table

Status
Not open for further replies.

QbLulu

Programmer
Feb 24, 2009
6
NL
Hi,

I have a problem crating a form that can call itself. Let 's say I have a table with fields id;parentid;term;termkind. (something like geographic terms: 1;null;USA;country and 2;1;Ohio;state, according to me a standard recursive tablestructure which tells you that Ohio is a state in the country USA)
For this I need a form with one editbox for term and one combobox for selecting the parent. Apart from that I need a button to add a new term if for instance I want to add "North America" as continent and as parent of USA, when I am in the record of Ohio. So this button should call the same form and if I am in that form and I want to add the world as planet I should be able to open the form again and again and again. After closing the form I should go back to Usa and that back to Ohio.

In delphi and in foxpro this is no problem. But in access (I'm using 2007) I can't figure this out and googling didn't give me an answer. Any help?
 
Hi, already a step further: My colleague pointed me to the following website: so now I have multiple instances of the form.

(problem for me is first finding the right terms and semantics, before one can google for the answer: I want something, but I do not know the name, so I am looking for "thing" and clearly that is too vague) :)

the next thing will be to give those instances the right parameters. But I think I'll succeed in that ...
 
Normally if I am working with hierarchical data I use a TreeView control for my main form for display and navigation. Click on a node to add child records to that level of node or edit/view the details of the record. With a tree view you can go as many levels as you want


USA
New York
New York City
Main Street
1st Street
Albany
Elm Street
Buffalo
Alabama


If interested I have lots of code to make this easier.
 
Interesting, haven't thought about that. Haven't worked with that before. I'm interested in reading further about it, but i'll be back here on monday. The rest of the week is work for another employer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top