Solved Multiple search engine with dropdowns (3 Viewers)

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
I opened the data files and I am not sure if the structure you sent is what you meant to send. I am assuming you want a top level for Music, Videos, and Audios. That is not what I see. Please look at the zip file and see if that is correct.
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
OK thank you very much. When you can do it. Good luck today!
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
Do not worry about sending files. I will make it so you can store any amount of folders but provide an application table that can store up to three default directories.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
This version allows you to store 3 folders in the application settings. To load all three folders the command is
SpanAndLog.
This clears out the table and loads in the direcotory folder data.

I currently call this after setting the default folders. If you distribute the application you may want to prompt the user at startup if they want to respan.

For demo purposes I show you how to reload the tree with a different directory. When you put this together you will probably pass 1,2, or 3 via open args to the form. Then instruct it to load that tree.

Now there is a lot of error checking that you need to do. You need to check that the folders to span exist. That the folders return records.

Again this is a demo. You need to put the event and procedures together in an order that meets your needs.
 

Attachments

  • VideoToDo_MajP1.accdb
    1.8 MB · Views: 186
  • Like
Reactions: WAB

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
Hi. I just saw the database. It's very good. Some details:

1. You have removed the ReadFiles button, which I think is interesting for updating folders and files.

ScreenShot001.jpg

2. You have enlarged the tree so much that it pops out of the screen. I have managed to make it smaller by copying the tree of another version, but I am not able to adjust it to the height that I show in the image.

ScreenShot002.jpg

3. It does not expand automatically when you enter the frmMS_FormsTree form.

ScreenShot003.jpg ScreenShot004.jpg
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
1. As I said it is a demo. You need to add/remove/organize the features that you want. All code is there you just have to call as needed.
Again if these are big directories you do not want to span all the time. After you span once you may only prompt the user to span at opening of the db and let them decide if things have changed.

2. This is no different than any other control. You can resize it any way you want. You need to resize the form and then the container in the form.
3. I can do this in the MSCOMCTL treeview, but I cannot get it to work with the MSFORMS. I contacted the developer on their website for help.
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
1. As I said it is a demo. You need to add/remove/organize the features that you want. All code is there you just have to call as needed.
Again if these are big directories you do not want to span all the time. After you span once you may only prompt the user to span at opening of the db and let them decide if things have changed.
Hi. I already know that it is a demo, so I have tried adding the code to read files and it does not work. I leave you what I have done.
2. This is no different than any other control. You can resize it any way you want. You need to resize the form and then the container in the form.
Yeah I guess. The point is that there are like two or three objects and I don't know which one is the one that won't let me shrink it.
3. I can do this in the MSCOMCTL treeview, but I cannot get it to work with the MSFORMS. I contacted the developer on their website for help.
Well, let's see if he responds, because it would be an important improvement.

Thanks!
 

Attachments

  • VideoToDo_MajP1.accdb
    2.6 MB · Views: 151

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
The form is resizeable. You need to shrink the form. It is a standard access form. Nothing special
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
I have already managed to put the size I want and also make the ReadFiles button work.
I think they have answered the question you asked.
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
And I have also gotten it to expand when starting the form by adding this when loading the form:

mcTree.ExpandToLevel 1, True
mcTree.Refresh
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
I update: to automatically expand the sum of folders and files, in total you have to add:

Code:
  mcTree.ExpandToLevel 1, True
  mcTree.Refresh
  mcTreeSummation.ExpandToLevel 1, True
  mcTreeSummation.Refresh
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
What remains for me is to ask you, apart from this tree, that it already works the way I want it, a question that has arisen these days regarding the counts we saw a week ago.

1. I have seen that in this database to make a tree you have added a module called mdlQueryUtilities, and in the database that we made with the counts in the dropdowns there is also a module called the same. Do they have the same functions and procedures to be able to combine them?

2. I am thinking of creating a continuous form with a list box, because I have files in multiple locations. That way, I can select multiple locations. I have several doubts about this:

2.1. Would it work with the modules to create filters that we saw with the counts in the dropdowns that we saw a few weeks ago?

2.2. Can you create a continuous form with list boxes? I have not found anything on the internet and I have tried to create it but I have not been able to make it work.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
1. I have seen that in this database to make a tree you have added a module called mdlQueryUtilities, and in the database that we made with the counts in the dropdowns there is also a module called the same. Do they have the same functions and procedures to be able to combine them
The same. I needed it for the insert query
2. I am thinking of creating a continuous form with a list box, because I have files in multiple locations. That way, I can select multiple locations. I have several doubts about this
I do not understand the question
2.1. Would it work with the modules to create filters that we saw with the counts in the dropdowns that we saw a few weeks ago?
If you are saying you would like to replace your continuous form with a listbox this will work. Instead of apply the filter to the form you can bind the listbox to the dynamic query
2.2. Can you create a continuous form with list boxes? I have not found anything on the internet and I have tried to create it but I have not been able to make it work
If you mean simply replace the continuous form with a big listbox yes. The form is just unbound and you have a large single listbox in the detail section.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
mcTree.ExpandToLevel 1, True
mcTree.Refresh
mcTreeSummation.ExpandToLevel 1, True
mcTreeSummation.Refres
I forgot the refresh.
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
If you mean simply replace the continuous form with a big listbox yes. The form is just unbound and you have a large single listbox in the detail section.
I give you an example.
 

Attachments

  • Nuevo Microsoft Access Base de datos.accdb
    804 KB · Views: 133

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
The reason: there are songs that can belong to more than one album, as often happens with compilations. So that's why to put have a multiple list box to select several, and that the filter that we did with drop-downs and the FAYT can be applied to it.
 

zelarra821

Registered User.
Local time
Today, 10:21
Joined
Jan 14, 2019
Messages
803
One last thing from the tree database. I'm noticing the DefaultFolderPath field change when I hit the ReadFiles button.

I have recorded a video for you to see the steps and where the error is.

 

Attachments

  • VideoToDo_MajP1.accdb
    2.4 MB · Views: 126

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
The reason: there are songs that can belong to more than one album, as often happens with compilations. So that's why to put have a multiple list box to select several, and that the filter that we did with drop-downs and the FAYT can be applied to it
No that cannot be done, with or without any filters. There is no you can bind a multi select listbox to a control. Your locations have to be stored in a junction table unless you use a multivalue field. That is two bad ideas.

I would concatenate the value using a concatenate function in the query
So you display. location1; Location2; Location 4
If you want to add or delete locations than you do that with a pop up form.
You also have the calculated field with only IDs, but not shown
1;2;4

Then you can code a filter. It can be done, it will be complicated.
 

Users who are viewing this thread

Top Bottom