What I am asking about is a specialized table algorithm.Ĭategory - my name for any parent node keyĮxclude - a boolean yes/no field which is checked by the algorithm if it is the entry selected for deletion, or any child of such a node/table entry. Let's pretend that the tree that the table creates is irrelevant, it doesn't even have to be considered here. Maybe I have stated the problem as being more complicated than it needs to be. I spent some time mulling this over last night, and reread this post. My code for DeleteChildren is majorly screwed up.even when I managed to get it to work, it only works for the chidren nodes on one branch in the node hierarchy. 'find the first observation which has a matching key Sub DeleteChildren(key As Integer, rst As DAO.Recordset) 'This is the recursive formulation of 'DeleteChildren Set rst = db.OpenRecordset("t_StdPa圜odes2", dbOpenDynaset)Ĭurrentvar = Me.fsub_StdPa圜ĭebug.Print "Current Variable = " & currentvar 'This is delete button event handler on the subform which shows the underlying tree tableĭim currentvar As String, currentid As Integerĭim db As DAO.Database, rst As DAO.Recordset I'm having problems writing a recursive subroutine to do this:įor instance I've tried something like this up to now. I want to be able to delete entries off the underlying tree table using recordsets so that when I delete a given entry for a node, I also delete all corresponding table entries for child nodes, children of child nodes etc. But I want to be able to delete items off the table without using any TreeView logic.that is eventhough I can delete node entries in the TreeView and have the underlying table update itself accordingly, I want to manipulate the table itself.through a form. I have a form with a ActiveX TreeView control which is reading off a table. Okay this problem is pretty complicated so bear with me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |