What's the best way for "users" to search records?

Discuss the database features
Post Reply
beetlejuice321
Posts: 3
Joined: Sun Aug 15, 2010 3:22 am

What's the best way for "users" to search records?

Post by beetlejuice321 »

I have created a simple "employee database", complete with a form for Employees to use to add/edit data accordingly.

What is the best method to allow staff to search this database in order to pull up a specific person?

Note: The form consists of only a persons name and employee information on a single page.


Is there a way to create a search box within the existing form to pull up a record? If there were more then one matching record will just the first one show based on the PK? Or is there a way to create a search form only, then allow users to see the list of matching results and select a record from there (which could open up into the employee form, etc.).
OpenOffice 3.1 on Windows 7 and Ubuntu 10.04
Arineckaig
Volunteer
Posts: 828
Joined: Fri Nov 30, 2007 10:58 am
Location: Scotland

Re: What's the best way for "users" to search records?

Post by Arineckaig »

What is the best method to allow staff to search this database in order to pull up a specific person?
I hesitate to suggest what might be the "best" method as it depends on several factors including amongst others the database engine, the size of the data source, the available indices and the complexity of your form. I would suggest, however, the "simplest" (and initially often the best) method is use of the binocular icon on the form navigation tool bar.

Alternatively the filter icon(s) on the same tool bar can be used to "filter" (as opposed to search) the form to show only the required records. The Base Help file indicates how these can be used.
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
AOOo 4.1.5 & LO 6 on MS Windows 10 MySQL and HSQLDB
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: What's the best way for "users" to search records?

Post by Villeroy »

The filter dialog of a grid view (including a form's grid view) can apply up to 3 criteria easily.
The form based filter tools give most freedom to the user to search for arbitrary things at any level of complexity (nested ANDs and ORs) . The designer of a form can declare some text controls as indexable (property "Filter Proposal") so it shows a list box with all entries in ascending order to pick from.
The "magic stick" filter comes handy at times.

A cascade of subforms is very easy to create. Then you pick a continent, a state, a region, a city, a quarter, a street,...

Advanced filters with optional criteria through a filtering table storing filter criteria for parameter substitution:
http://user.services.openoffice.org/en/ ... hp?id=4212
http://user.services.openoffice.org/en/ ... hp?id=7063
http://user.services.openoffice.org/en/ ... hp?id=6849 (list box and date fields)
http://user.services.openoffice.org/en/ ... hp?id=8622 (check boxes instead of list box)
http://user.services.openoffice.org/en/ ... hp?id=6442 (combo box)
http://user.services.openoffice.org/en/ ... 427#p96427 (Filtering Base form on a spreadsheet)

Countless Base macros try to do the same thing (filter by form control) more or less efficiently.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply