search in library record

  • Thread starter Thread starter fatcat
  • Start date Start date
F

fatcat

Hi all,
I would like to make search form for a library book list.
how can i get user's input as a Queries' criteria?
thx a lot
 
Put the following expression in the criteria of the WhatBookToRead field:
[Grammar]
 
If you want to search a field [BookTitle] for values containing user input
text:
Create a form [frmFindBook] with a text box [txtFind]. Then in your query in
the criteria under [BookTitle], add an expression like:
Like "*" & Forms!frmFindBook!txtFind & "*"
 
Hi all,
I would like to make search form for a library book list.
how can i get user's input as a Queries' criteria?
thx a lot

A "Parameter Query" is useful here. Since you don't say what kind of
criteria you want to use, nor anything about the structure of your
tables, I'll make some guesses.

For the users' convenience I'd suggest creating a small form, let's
call it frmCrit, with (say) three textboxes on it: txtTitle,
txtAuthor, txtGenre.

You could then create a Query on your Books table with a criterion
under Title of

LIKE "*" & [Forms]![frmCrit]![txtTitle] & "*"

and similarly under the fields Author and Genre (if your table has
such fields).

If you then create a Form displaying the relevant information to allow
the user to find the book, you can base it upon this query and put a
command button on frmCrit to open it.
 
Back
Top