Find Record

In forms or database tables, you can search through data fields, list boxes, and check boxes for specific values.

To access this command...

Find Record icon on the Table Data bar and Form Design bar.

Find Record Icon

Find Record


When searching a table, the data fields of the current table are searched. When searching in a form, the data fields of the table linked with the form are searched.

tip

The search described here is carried out by LibreOffice. If you want to use the SQL server to search in a database, then you should use the Form-based Filters icon on the Form bar.


The search function is also available for table controls. When calling the search function from a table control, you can search each column of the table control corresponding to the database columns of the linked database table.

Search for

Specifies the type of search.

Text:

Enter the search term in the box or select it from the list. The text under the cursor is already copied into the Text combo box. Note that while running a search in a form, tabs and line breaks cannot be processed.

Your search terms will be saved as long as the table or the form document is open. If you are running more than one search and you would like to repeat the search term, you can select a previously used search term from the combo box.

Field content is NULL

Specifies that fields will be found that contain no data.

Field content is not NULL

Specifies that fields will be found that contain data.

Where to search

Specifies the fields for the search.

Form

Specifies the logical form in which you want the search to take place.

note

The Form combo box is only visible if the current document is a form document with more than one logical form. It does not appear during a search in tables or queries.


Form documents may contain multiple logical forms. These are individual form components, which are each linked to a table.

The Form combo box contains the names of all logical forms for which controls exist.

All Fields

Searches through all fields. If you are running a search in a table, all fields in the table will be searched. If you are running a search in a form, all fields of the logical form (entered under Form) will be searched. If you are running a search in a table control field, all columns that are linked to a valid database table field will be searched.

Note that the fields of the current logical form do not have to be identical to the fields of the form document. If the form document contains fields that point to multiple data sources (that is, multiple logical forms), the All Fields option will only search for the fields linked to data sources in the form document.

Single field

Searches through a specified data field.

Settings

Defines settings to control the search.

Position

Specifies the relationship of the search term and the field contents. The following options are available:

Position

Description

anywhere in the field

Returns all fields containing the search pattern anywhere in the field.

beginning of field

Returns all fields containing the search pattern at the beginning of the field.

end of field

Returns all fields containing the search pattern at the end of the field.

entire field

Returns all fields containing the search pattern as an exact match to the contents of the field.


note

If the Wildcard expression check box is marked, this function is not available.


Apply field format

Specifies that all field formats are considered when searching in the current document. Field formats are all visible formats that are created using the following possibilities:

  1. in table design mode for field properties,

  2. in data source view on column formatting,

  3. in forms on control properties.

If the Apply field format box is marked, the data source view of the table or form is searched using the formatting set there. If the box is not marked, the database is searched using the formatting saved in the database.

Example:

You have a date field, which is saved in "DD.MM.YY" format in the database (for example, 17.02.65). The format of the entry is changed in the data source view to "DD MMM YYYY" (17 Feb 1965). Following this example, a record containing February 17 is only found when the Apply field format option is on:

Apply field format

Search pattern

on

"Feb" is returned, but not "2".

off

"2" is returned, but not "Feb".


It is recommended that you always search using field formatting.

The following examples show possible issues when searching without field formatting. These issues depend on the database used and only occur for certain internal default formatting:

Search results

Cause

"5" returns "14:00:00" as a time.

Time fields are not defined for dBASE databases and must be simulated. To internally display the time "14:00:00", a "5" is necessary.

"00:00:00" returns all records of a standard date field.

The database stores a date value internally using a combined date/time field.

"45.79" does not return "45.79" although the entire field option is selected under Position.

The view shown does not match what is stored internally. For example, if value "45.789" is stored in the database as a field of type "Number/Double" and the shown formatting is set to display only two decimals, "45.79" is only returned in searches with field formatting.


In this case, standard formatting is formatting that refers to the internally stored data. It is not always visible to the user, especially if it is used for simulating data types (for example, time fields in dBASE databases). This depends on the database used and the individual data type. Searching with field formatting is appropriate if you only want to find what is actually shown. This includes fields of type Date, Time, Date/Time and Number/Double.

However, searching without Apply field format is appropriate for larger databases with no formatting issues, because it is faster.

If you are searching the values of check boxes, and Apply field format is on, then you will receive a "1" for marked check boxes, a "0" for unmarked check boxes, and an empty string for undefined (tristate) check boxes. If the search has been carried out with Apply field format set to off, you will see the language-dependent default values "TRUE" or "FALSE".

If you use Apply field format when searching in list boxes, you find the text displayed in list boxes. If you do not use Apply field format, you will find the contents corresponding to the standard field format.

Match case

Specifies that upper and lower case are taken into consideration during the search.

Search backwards

Specifies that the search process will run in reverse direction, from the last to the first record.

From top / From bottom

Restarts the search. A forward search restarts with the first record. A backwards search restarts with the last record.

Wildcard expression

You can use the following wildcards:

Wildcards

Meaning

Example

?

for exactly one arbitrary character

"?loppy" returns "Floppy"

"M?ller" returns, for example, Miller and Moller

*

for 0 or more arbitrary characters

"*-*" returns "ZIP-Drive" and "CD-ROM"

"M*er" returns all entries starting with an "M" and ending in "er" (for example, Miller, Moller, Mather)


If you want to search for the actual characters ? or *, precede them with a backslash: "\?" or "\*". However, this is only necessary when Wildcard expression is enabled. When the option is not enabled, the wildcard characters are processed like normal characters.

Regular expression

Searches with regular expressions. The same regular expressions that are supported here are also supported in the LibreOffice Find & Replace dialog.

Searching with regular expressions offers more options than searching with wildcard expressions. If you search with regular expressions, the following characters correspond to those used in searches with wildcards:

Search with wildcard expression

Search with regular expressions

?

.

*

.*


Similarity Search

Find terms that are similar to the Find text. Select this checkbox, and then click the Similarities button to define the similarity options.

Match character width (only if Asian languages are enabled)

Distinguishes between half-width and full-width character forms.

Sounds like (Japanese) (only if Asian languages are enabled)

Lets you specify the search options for similar notation used in Japanese text. Select this checkbox, and then click the Sounds button to specify the search options.

Sets the search options for similar notation used in Japanese text.

Treat as equal

Specifies the options to be treated as equal in a search.

Ignore

Specifies the characters to be ignored.

State

The State line shows the records returned by the search. If the search reaches the end (or the beginning) of a table, the search is automatically continued at the other end.

In very large databases, finding the record in reverse search order can take some time. In this case, the status bar informs you that the records are still being counted.

Search/Cancel

If the search is successfully completed, the corresponding field in the table is highlighted. You can continue the search by clicking the Search button again. You can cancel a search process by clicking the Cancel button.

Close

Closes the dialog. The settings of the last search will be saved until you quit LibreOffice.

If several tables or forms are open, you can set different search options for each document. When you close the documents only the search options of the document last closed are saved.

Please support us!