Multiple Nodes Keystroke Usage

Posted on 2011-05-09
Medium Priority
Last Modified: 2012-05-11
I have multiple tree structures in my database on forms. All of them seem to working appropriately except for one. Basically you have the main node and then nodes underneath the main. You can use keystrokes to get to the different nodes + and - to open and close the nodes, the arrow keys to go up and down. This is working perfectly for a all forms except for one and I have no idea where to begin troubleshooting why it is not working. Any suggestion on where to start and go from there? I've tried doing a comparison between one that works and one that doesn't and still am not really finding the problem.

Question by:dminx13
  • 7
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35723257
it will help if you can upload a copy of the db.
or create a blank db and import all the objects relevant to this question.

upload the created db

Author Comment

ID: 35723276
Oh, another thing I thought of that might be helpful. It works the very first time. So I can open the form type in a "r" and it will take me to the r section. After that inital keystroke it stops working. I can also do a down arrow or a + on the first node and it works, but again after that initial keystroke nothing will work.

Author Comment

ID: 35723286
I know uploading would be helpful but this isn't a small database nor is it something that I know how everything links together just yet. I am working on it, but it isn't that simple to do.
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.


Author Comment

ID: 35723728

At this point there is no way for me to post a DB. The frm links to a system table that is pointing to a different database. I have tried to pick up just the tables that it needs but that isn't allowing the form to run either. I could post the code for the frm but that is about all I am going to be able to do at this point.......

Author Comment

ID: 35723740
This is what fill the tree:

    '  Procedure is used to fill the position tree
    Dim objTree As TreeView
    Dim objImage As ImageList
    Dim nodDepartment As Node
    Dim nodPosition As Node
    Dim sKey As String
    Dim sName As String
    Dim sDept As String
    Set objTree = Me.treePositions.Object
    Set objImage = Me.imgListIcons.Object
    objTree.ImageList = objImage
    With Positions
        sDept = "noDepartment"
        If .EOF And .BOF Then
            '  no records to report
                If .Fields("Department") <> sDept Then
                    '  we are on a new department and we need to add
                    '  a node for the department
                    sDept = .Fields("Department")
                    sKey = "D" + sDept
                    sName = .Fields("Name") + " - " + Right(.Fields("Department"), 5)
                    Set nodDepartment = objTree.nodes.Add(, , sKey, sName)
                End If
                '  Add the position nodes for each department
                sKey = "P" + .Fields("Department") + .Fields("JCC")
                sName = .Fields("Position") + " - " + Right(.Fields("JCC"), 4)
                If .Fields("Provisional") = True Then
                    '  Light On Icon to highlight a provisional position
                    Set nodPosition = objTree.nodes.Add(nodDepartment, tvwChild, sKey, sName, 2)
                ElseIf .Fields("Status") = "A" Then
                    '  No Icon
                    Set nodPosition = objTree.nodes.Add(nodDepartment, tvwChild, sKey, sName)
                    '  Red X for inactive positions
                    Set nodPosition = objTree.nodes.Add(nodDepartment, tvwChild, sKey, sName, 1)
                End If
            Loop Until .EOF
        End If
    End With
    '4/12/2011 trying to get tree to work properly
    'With objTree
    '   For i = 1 To .nodes.Count
    '      .nodes(i).EnsureVisible
    ' Next i
    'End With
    'Set rs = Nothing
    'For i = 0 To 3
    '    Set nod(i) = Nothing
    'Next i
    ' Set objTree = Nothing

End Sub

Author Comment

ID: 35724793
Could it have anything to do with multiple flex grids? I was looking at the ones that work and they only have one flex grid where this one has multiple.

Accepted Solution

dminx13 earned 0 total points
ID: 35724947
OK, well after 3 hours of testing I finally figured it out. It seems that after posting on here I often find the answer.

Someone in the coding had set the focus to be on a specific flexgrid. I finally figured out which one by deleting the flexgrids individaully. Once it was gone the tree worked so I commented out the set focus and now it works perfectly.

Author Closing Comment

ID: 35759563
Figured out my own solution.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question