Custom Search Criterion

Discuss the database features
Post Reply
mrmltonge
Posts: 1
Joined: Tue Dec 04, 2007 1:09 pm

Custom Search Criterion

Post by mrmltonge »

Hello all. I've been tasked with implementing a customer database for a small start up company. My first instinct was to create it in Access (having been developing databases in that for many years) but then thought... why not start this company on their path to OO. I've used Writer and Calc for ages now, and install OO on new build machines for clients (after checking of course... I don't load their machines up with stuff they don't want) but haven't looked at Base until today.

One thing I need, and can't figure out how to work, is the ability to make the criterion in a Query user definied. In Access in the SQL statement I simply enter

Code: Select all

WHERE fieldName=[Please Specify a name to search for]
However, this brings up an error in Base, and I can't find anything about this in the documentation. Is their a pre set variable for asking for user entered criterion or is it not possible at all?

Thanks in advance,

Mark
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Custom Search Criterion

Post by DrewJensen »

You can use this.

Code: Select all

WHERE fieldName=:SearchName
You can only use single words for the prompt. This will then work for opening the query direct, if used as the dataform control for a data input form or for a report.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Post Reply