Navigate alphabetic list with keyboard ?

Discuss the database features

Navigate alphabetic list with keyboard ?

Postby mark_orion » Fri Jun 05, 2009 3:59 pm

I have a master form with a subform. The master is an alphabetic list of names based on a query. This list is very long (1.500 records). I would like to be able to navigate this list with the keyboard: e.g. pressing "k" would navigate to the first entry in the form that starts with a "k". I am fairly new to macros so I would very much appreciate a solution for this if anyone has done it before.
thanks, Mark
mark_orion
 
Posts: 38
Joined: Thu Oct 02, 2008 11:53 am

Re: Navigate alphabetic list with keyboard ?

Postby Villeroy » Fri Jun 05, 2009 6:26 pm

A master form selects a record and selects exactly matching records in one or more subforms. If you try to filter by subform, the main form filters the sub form where some corresponding fields match exactly.

I attach a filter example with 2 forms. They are 2 unrelated main forms.
One form is bound to a table of filter criteria and the other form is bound to a query which select matching records from the main table.
You enter a criterion into the box and refresh the second form. An empty criterion shows all records.
The additional report uses the same filtered row set as the second form.
Attachments
BerlinStreets.odb
Lots of street names filtered by first chars
(971.93 KiB) Downloaded 789 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28670
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Navigate alphabetic list with keyboard ?

Postby Villeroy » Sat Jun 06, 2009 3:34 pm

Yes, I know that my solution is a filter rather than a programmed navigation feature. Therefore it works with the given features of the involved appliciations (HSQL and Base). I really hate macro programming for Base.

Since I'm off-topic anyway, I finally found a reason to install v3.1: Base introduced working parameter substitution after 6 years of clueless development. This allows for much better (and easier) form-filters using subforms and named parameters. It is far easier to get editable record sets from arbitrary arguments entered into a form control. The form controls taking the criteria still needs to be bound though. The extra table to take the filter arguments is still necessary.

I'll attach a newer version of the same database for v3.1
Attachments
BerlinStreets_3.1.odb
WHERE(UPPER("Name")LIKE UPPER(:StartsWith)||'%')OR(:StartsWith='')
(983.3 KiB) Downloaded 5022 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28670
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests