List Box with navigation bar problem

Hi,
I am using LO7 base with Windows 10 HSQLDB split database. I have created a form with subforms and subsubforms. In order to access some ID’s faster I created a list box to call up other IDs (to avoid clicking next and previous) now it seems that after creating the list box with help of a filter I can call up IDs with the list box but the navigation bar will not let me do “next” or “previous”.

Any ideas where I could have done a mistake?Test_Chris.odb

Can you share sanitised (no data) version of the database? Or a simplified version showing the problem.

Hello,

Sounds like the main form is listing a record by way of a query using the value in filter. If so, there is no next or previous as the record selection from the filter is specific. You need a blank selection to allow all records to be selected in the query.

Thank you @Przemo, thank you @Ratslinger, I have checked the whole main form and couldn’t find the problem. Now have I done a simple filter on the attached version, I can select with the list box but I cannot use the navigation bar to go through the records. So I must be doing something wrong in the way I build this. Any suggestions welcome, thanks!

@Chris-H,

As stated in my comment, your have selected one record to display. With that there are no records to move to or from. What I believe you are attempting, is to select an item from the list box. Then using a macro, search the table to get to that record and display. With this you would be able to use the navigation bar. But this is different from using a filter. Filters are to weed out unwanted records.

While this may have some unique use, I do not believe this as very practical.

Thank you very much @Ratslinger, that pretty much answers my question and yes I was trying to use both at the same time and I now undertand. I will try and stay away from more macros, again, many thanks!

Hello,

As stated in the comment, the use of the filter is selecting only one record. With that there is no next or previous available with the navigation bar.

During the process, put together a small macro to accomplish this. In the attached sample, CustomersModified form, when a list box item is selected the main form will go to that record. Since there is no filtering, the navigation bar works.

This can be problematic when you start to accumulate a number of records. The list box will get very long (direct entry can overcome) and the searching will slowly get longer. The code is presented simply to demonstrate how this may be applied. Can be useful in other ways.

Sample ----- LBgoToRecord.odb

Dear @Ratslinger, I am very thankful for the heart and work you put into answering us guys. May I ask you if say in the future I will have a bigger list of data with say hundreds of adresses, would the best way to find a record be to simply make a list as the main form and then each customers details in a subform, this way I search them more easily? would that be safer? I am asking as I have learned from you to be careful with too many macros. Again, thanks!

@Chris-H,

I have no problem with macros if one understands and can fix/modify them. There are many small beneficial macros posted on this site which make life easier.

For your question, we return to the use of table filtering. The approach here may be a text box (vs a list box) to enter say a part of the address you seek. With the query the use of Like can be of great help here and present a limited list. You can set your form/sub form/ sub sub for etc in many different ways. There are many examples of table filtering posted here - with and without macros.