Treeview in MS Access: Part 1 - The basics, loading information into the treeview

  Рет қаралды 88,899

TheSmileyCoder

TheSmileyCoder

Күн бұрын

Пікірлер: 73
@Myltion
@Myltion 2 жыл бұрын
Just letting you know that even in 2022 this video is still helping people! This tutorial is excellently done and helped me a lot regarding a project. Thank you! :)
@TheSmileyCoder
@TheSmileyCoder 2 жыл бұрын
Thanks, I appreciate it!
@UncleLoren
@UncleLoren 4 жыл бұрын
In many years of Access development, I had never used TreeViews. The instructions in this video are excellent, everything worked the first time for me, and I'm going to have to watch the rest of the series. It's hardly unusual for data to have a hierarchical representation. I'm excited about using these controls to help the user navigate recordsets and/or change the data displayed on forms. If anyone has trouble with the formatting aesthetics, backcolor, etc., -- and your problem isn't addressed in the other videos -- try playing around with the property settings or modifying them in vba. Lots of useful info out on the various coding forums. Thank you so much for sharing your knowledge, TheSmileyCoder. (Subscribed!)
@TheSmileyCoder
@TheSmileyCoder 4 жыл бұрын
Hi. Glad to hear you liked it, and the video is still relevant :)
@TheSmileyCoder
@TheSmileyCoder 12 жыл бұрын
Thank you Crystal. Glad you liked it. It means a lot coming from someone with your experience in creating online video tutorials.
@zsugo1
@zsugo1 4 жыл бұрын
Thank You, it was very helpful in my project (in fact before I can't imagine how to manage multiple levels in Access). Great job !
@TheSmileyCoder
@TheSmileyCoder 4 жыл бұрын
Glad you liked it!
@SimonPowell1000
@SimonPowell1000 7 жыл бұрын
That video series was awesome, I've been working with hierarchies in a very cumbersome, restrictive manner until I saw this! Appreciate the effort you put in :-)
@diemswo
@diemswo 7 жыл бұрын
I'd like to thank you TheSmileyCoder very much for this nice video, which guided me on creating a TreeView object in my database! My only suggestion would be to include in its begging the instructions you gave in the comments section of your homepage in 2013 regarding the reference to the “Microsoft Windows Common Controls 6.0 (SP6)”. With warm regards from Brazil!
@TheSmileyCoder
@TheSmileyCoder 7 жыл бұрын
Thank you for those kind words. At the time of making the video in Access 2010, the reference was added automatically. Sadly, changing the video is rather difficult, which is why I haven't "fixed" the issue you mention.
@tchew
@tchew 11 жыл бұрын
Thanks for this Anders... looking forward to going through all the videos in this series. At the 13 minute mark you configure some of the TreeCtrl Properties... for me, all the drop-down options are empty for me - you wouldn't know what's causing this?
@amysarkar
@amysarkar 12 жыл бұрын
Perfect! Just what I needed just when I needed it. Thank you so much for putting this out there.
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
Hi Matt I haven't heard of that happening before. I would start by checking there is a reference to the treeview controls library. Open your VBE and look at the reference for "Microsoft Windows Common Controls 6.0 (SP6)". On some systems the reference must be set manually. From the reference window browse to your windows directory and select the MSComCtl.OCX file. If that doesn't work, I need some more info on your Access and windows version (and 32 / 64 bit) to be of more help. TheSmileyCoder
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
Did you check out part 2 of the tutorial on how to navigate the treeview by use of the node click event?
@macy1234ish
@macy1234ish 12 жыл бұрын
I've been looking for a demo on treeview for some time. Thank you
@dollysjoseph
@dollysjoseph 12 жыл бұрын
This was EXTREMELY informative!! Thank you for doing this!!
@joshuaseaton3205
@joshuaseaton3205 2 жыл бұрын
Great video! Very helpful.
@LearnAccessByCrystal
@LearnAccessByCrystal 12 жыл бұрын
excellent introduction to using the TreeView control in Microsoft Access, thanks Anders ~ Crystal ~ have an awesome day ~
@rickhdee
@rickhdee 9 жыл бұрын
Thank you for an informative and very well done tutorial.
@MuhammadSibtainArain
@MuhammadSibtainArain 11 жыл бұрын
Dear ThesmileyCoder I have done all as you explained in your this session, but unfortunately i am unable to have the child node under the parent node instead all the parent and child nodes in a single column shapp, furthermore, the parent node which i added first is coming in the last and all other nodes are adding in the reverse order, furthermore no plus minus sign is being appeared. Can you put some extra light on it Regards
@maria_venckovskaya
@maria_venckovskaya 3 жыл бұрын
You're the best! Thank you :) It's was helpful for me.
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
Hi Cesar. Sorry but I have no idea what your are talking about. I would suggest you post your question at a access site like UtterAccess which is more suited for this kind of discussion, as youtube posts are somewhat limited in both length and formatting.
@BaubetriebBoettcher
@BaubetriebBoettcher 7 ай бұрын
Thank you very much, it's great 😀
@TheSmileyCoder
@TheSmileyCoder 12 жыл бұрын
@Thomas Andersen You are quite correct. I suppose it could be a version issue. When I add the treeview control in Ac2010 the reference is automatically added for me, but perhaps it is not so in earlier versions of Access. Which version are you using?
@헌일김-w9w
@헌일김-w9w 3 жыл бұрын
I am using a treeview in a form but I can't set the accurate width and height in the design view. When I have set the width and height I want, I get smaller results than I have set. I have no idea how to fix this problem. Please let me know if you know how to fix this problem.
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
Can you help me with a code to apply in your example to open forms to give double-click each of the options
@js-cx8wk
@js-cx8wk 3 жыл бұрын
thank you so much!!!
@IoDavide1
@IoDavide1 10 жыл бұрын
I can't find all the events you can see at 3.25, I have 5 events. Where are all the others?
@GKeeperWillie
@GKeeperWillie 12 жыл бұрын
I had the same problem with finding the correct reference. For other users here is what needs to be done: in VBA go to "Tools", "References", click "Browse" and in the C:\Windows\System32 folder select the MSCOMCTL.OCX file.
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
No matter leave, thank you, yet there has been no expert who can answer my question, maybe I can do it despite my limited experience, Greetings
@AbdallaAwad
@AbdallaAwad 8 ай бұрын
This is super professional , thanks how can i get the sample code, website is unreachable now
@oscarb4240
@oscarb4240 5 жыл бұрын
Hi. I followed your video to create a treeview in access 2019. when I run the code as per the 12:12 mark access locks up. I have tracked it down to it being stuck in an infinite loop becuase the bookmarks are not working. When I test to see if the recordset is bookmarkable Access state that it is not. I have searched but cannot find a reason as to why this is. Could you help? Thank you in advance.
@beluga59
@beluga59 Жыл бұрын
just great, thank you
@LII0099
@LII0099 11 жыл бұрын
Génial. Exactement ce que je cherchais !
@GKeeperWillie
@GKeeperWillie 12 жыл бұрын
Thanks. And by the way thanks a lot for making and uploading the video. It was just what I needed to get my treeview form up and running :-)
@facilitymanagement1895
@facilitymanagement1895 7 жыл бұрын
Im really thanking you from the heart for demonstrating this code of treeview access database. I would like to draw your kind attention demo another access treeview code for opening access form accordingly on the node we double click and the form name should be called from the table as well. Anxiously waiting for your reply.
@TheSmileyCoder
@TheSmileyCoder 7 жыл бұрын
I would recommend you look at part 2 of the series where I demonstrate "Navigation by treeview".
@BernardSibanda
@BernardSibanda 11 жыл бұрын
where can i download this code?
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
Don't forget to watch the rest of the tutorials. Just released part 6 on how to create new nodes/records from the treeview.
@adrianconnolly8568
@adrianconnolly8568 Жыл бұрын
Hi Is there any means to use MS Access as a document manager to view the contents of a SharePoint folder, for file like word and excel file within a folder and open them for mail merge etc. And display those file’s in a list box using treeview
@VitaliyYeliashevskyi
@VitaliyYeliashevskyi 5 жыл бұрын
Hi, I'm trying to build the treeview using this tutorial but I'm getting an error 28 Out of stack and access closes. Could you please help with the code? my data has approx 1800 lines and 4 levels deep
@TheSmileyCoder
@TheSmileyCoder 5 жыл бұрын
Hi Vitalii Two possible scenarios: Either you missed something in your code, and you have a infinite loop, thus adding nodes until you run out of memory. Alternatively, make sure your Office is fully updated. There was a bug maybe a year ago that caused issues with treeviews with more than a few hundred nodes (don't know the exact limit)
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
You can find it at my blog (I added the link to the video description).
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
I would ask you to please could you help me complimenting the code you need to double click to give me the node aperturar allow a form that indicated in the table, I have an example but I can not adapt to your example , I would beg if I can help , I need to pass an access cycle , TControl and NControl variables are 2 columns which I have adapted to the form, the first reference TControl if F is a form and the form name NControl you want to open . I can adapt these codes as your example that
@AoE3Gamer
@AoE3Gamer 10 жыл бұрын
I'm getting a 'Type mismatch' error on Set tv = Forms("[formname]").[nameOfControl].Object Do you know what's wrong?
@TheSmileyCoder
@TheSmileyCoder 10 жыл бұрын
Hi Thomqa Where is your tv variable defined? You should have a line looking like Dim tv as mscomctlLib.Treeview (Inside procedure) or Public tv as mscomctlLib.Treeview (module level or global variable)
@AoE3Gamer
@AoE3Gamer 10 жыл бұрын
TheSmileyCoder It looks like this: Public Sub loadTreeview() Dim tv As MSComctlLib.Treeview Set tv = Forms("frm_RubriekenBeheer").TreeRubrieken.Object ....
@TheSmileyCoder
@TheSmileyCoder 10 жыл бұрын
Thomqa z. What access version are you using? Have you set the library reference? I found that when I made the video using 2010 the reference was set automatically when I inserted the treeview control, but others have reportet that they needed to set the reference manually. You might need to browse for it, it is usually located in the C:\Windows\SysWow64 and is named MSCOMCTL.OCX
@AoE3Gamer
@AoE3Gamer 10 жыл бұрын
TheSmileyCoder (Im using Access 2013 64-bit on windows 8) Yes, I already encountered that problem. It wouldn't recognize MSComctlLib.Treeview. At that moment I was searching for that file but I couldn't find it. So I downloaded it, then I made that reference. That solved the "MSComctlLib.Treeview" problem, but then the problem "type mismatch" occurred. ps. I placed the treeviewcontrol driver in my documents, from there I made the link. I tried to change it to system32 but it doesn't want to (I can copy it, but the reference can't be changed).
@TheSmileyCoder
@TheSmileyCoder 10 жыл бұрын
Thomqa z. Are you certain that you are using 64bit OFFICE? Note that the default is that 32bit office is installed, even when using a 64 bit Windows. The treeview control is not compiled nor written for 64 bit OFFICE, so it cannot work there. Myself, I use 64bit windows, but 32bit office and can use the treeview fine enough. On my blog I did create a post about having some troubles getting the treeview to work in Access 2013, but did get there eventually. You can take a look at www.TheSmileyCoder.com
@sherifKamalx1
@sherifKamalx1 7 жыл бұрын
in my access is not appear in menu activeX what I can do
@TheSmileyCoder
@TheSmileyCoder 7 жыл бұрын
Do a search for mscomctl.ocx on your machine to see if it is available. Then from the VBE reference window, you can browse for it, and manually select the file.
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
Help me with a code to match the tutorial one the double click option with 2 forms aperturar TControl and NControl adjoining columns, the first identify varibles F = Form; C = Check, R = Report, S = Exit or DoCmd.Quit and A = back or return NControl column and put the names of the forms I want aperturar, thanks in advance
@نقلياتالغيدانى
@نقلياتالغيدانى 7 жыл бұрын
HI .. I have an acces database a mmaik form containes ather form want to cancel changes if save button isnot clicked..how can i do that..im asking if u can help me ..proff
@TheSmileyCoder
@TheSmileyCoder 7 жыл бұрын
This is not really related to the video or topic, so I suggest you ask your question at ExpertsExchange or Utteraccess.
@نقلياتالغيدانى
@نقلياتالغيدانى 7 жыл бұрын
thx..but i couldnt. reach u some where else..i have ask about it in the blog but no answer any way..thx alot
@sozonpv
@sozonpv 10 жыл бұрын
This is a great tool. Is it possible to apply a drag and drop feature? Can anyone provide any links to any working examples of this treeview in access database applications? Hopefully I'll have time to work on this.
@bsworldsolution6626
@bsworldsolution6626 4 жыл бұрын
How is this possible on vb.net
@abdulkaderalmograbi3428
@abdulkaderalmograbi3428 5 ай бұрын
Thank You, it was very helpful project can you shear the all code in video
@mafgeology
@mafgeology 2 жыл бұрын
Great 👍
@GKeeperWillie
@GKeeperWillie 12 жыл бұрын
Actually I am using Access 2010 as well, running on Windows Vista. So I don't know why there is a difference.
@Euroduplex
@Euroduplex 6 жыл бұрын
I'd like to set PK_Req and, thus, ID_Parent as Text(String, like G1.1.1.2). What change do I have to make for that on strFind = "ID_Parent=" & lngParentID? looks like I'm having continuous problem on that.
@TheSmileyCoder
@TheSmileyCoder 6 жыл бұрын
When using a string as a key, you must let access know that it is looking for a string. You do this by the use of single quotes, e.g. strFind="ID_parent'" & strParentID & "'"
@joseuzcategui4198
@joseuzcategui4198 Жыл бұрын
Thank you
@TheSmileyCoder
@TheSmileyCoder 12 жыл бұрын
Odd. Using ac2010 on windows 7 myself, but I would have thought it would not be dependent on the windows version. Maybe something else I am just not seing. Anyway, best of luck with your project.
@ericbrenner690
@ericbrenner690 8 жыл бұрын
This seems to be WAY too complex just to populate a Treeview control. Why not just have a couple of parent and child items in a database and describe how to populate them?
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
Many experts, few know ..... or few who take time to answer a query for help
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
double click to open related form options
@TheSmileyCoder
@TheSmileyCoder 11 жыл бұрын
KZbin is good for sharing videos, its not good for a question/answer type of scenario. I suggest you visit UtterAccess and post a question. You will find hundreds of experts and several Access MVPs, and myself ready to help you understand and use Access. That forum is just better suited for posting technical questions, and supports attachments and links, which youtube does not.
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
Many experts, few know .....
@cesarbustos1504
@cesarbustos1504 11 жыл бұрын
hola
@roberto.melgar
@roberto.melgar Жыл бұрын
I want to load the folders of a directory I have this code, when loading it stops at a line CargarDirectorios nodoCarpeta.nodes, subcarpeta this is my code, can you help me please Private Sub Form_Load() ' Ruta de la carpeta principal Dim carpetaPrincipal As String carpetaPrincipal = "C:\Adm-Colegio" ' Verificar si la carpeta principal existe If Dir(carpetaPrincipal, vbDirectory) "" Then Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim carpeta As Object Set carpeta = fso.GetFolder(carpetaPrincipal) ' Llamar al procedimiento recursivo para cargar el árbol de directorios CargarDirectorios TreeView1.nodes, carpeta Set fso = Nothing End If End Sub Private Sub CargarDirectorios(ByVal nodes As nodes, ByVal carpeta As Object) ' Recorrer las subcarpetas de la carpeta actual Dim subcarpeta As Object For Each subcarpeta In carpeta.SubFolders Dim nombreCarpeta As String nombreCarpeta = subcarpeta.Name ' Agregar la subcarpeta como un nodo hijo Dim nodoCarpeta As Node Set nodoCarpeta = nodes.Add(, tvwChild, , nombreCarpeta) ' Cargar recursivamente las subcarpetas de la subcarpeta actual CargarDirectorios nodoCarpeta.nodes, subcarpeta Next subcarpeta End Sub
Treeview in MS Access Part 2, Navigation by Treeview
12:02
TheSmileyCoder
Рет қаралды 26 М.
Making a Custom Ribbon in Microsoft Access - Part 1
10:50
Access Jitsu
Рет қаралды 50 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
Building a Decision Tree Database in Microsoft Access. Part 1: Introduction
17:27
Computer Learning Zone
Рет қаралды 4,3 М.
AEU30: Using Treeviews with Access (Pete Poppe)
1:07:42
AccessUserGroups.org
Рет қаралды 1 М.
Microsoft Access A to Z: Designing Table Relationships
10:40
Lisa Friedrichsen
Рет қаралды 77 М.
An Introduction to VBA Code in Microsoft Access
9:51
MyExcelOnline.com
Рет қаралды 22 М.
How to use Microsoft Access - Beginner Tutorial
31:07
Kevin Stratvert
Рет қаралды 3,5 МЛН
How to use ADO and VBA to Read from a Database
10:31
Excel Macro Mastery
Рет қаралды 45 М.
Treeviews in MS Access, Now with Icons, Part 4
7:35
TheSmileyCoder
Рет қаралды 21 М.
How to Use the InStrRev Function in Microsoft Access
14:06
Computer Learning Zone
Рет қаралды 2,8 М.
How to Use the Eval Function in Microsoft Access
24:57
Sean MacKenzie Data Engineering
Рет қаралды 2,7 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН