search in library record

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
 
P

PC Datasheet

Put the following expression in the criteria of the WhatBookToRead field:
[Grammar]
 
D

Duane Hookom

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 & "*"
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top