access2003 question

T

the golfer

I'm trying to setup a database for a library for a non-profit organization.
What I need help with is setting up a command button to search a field for
information. Example: Author of a book where I input the author's name and it
returns the author of the book. If additional books by same author exist, I
want it to have something that will take me to the next valid record. If I
input a name that doesn't exist in our library, I want it to return something
to say the author doesn't exist. Would you also please email me with this
information at (e-mail address removed). as well as (e-mail address removed) Thanks,
Charles Knight (I'm a volunteer).
 
J

Jeff Boyce

Charles

(newsgroup protocol means that questions asked in the 'groups get answered
in the 'groups, that all might benefit)

I'm a little confused. If you input an author's name, why would you want
the author's name returned?

Another approach to what I think you are trying to do would be to:
* create a combo box that lists all authors. This way, no one need
type-in (i.e. remember) an author's name.
* create a listbox (or use a subform) that lists all books having the
selected author.

Perhaps if you described further what you intend to do with the information
after retrieving it, folks may be able to offer other approaches.
 
T

Tim Ferguson

: Author of a book where I input the author's name and it
returns the author of the book. If additional books by same author
exist, I want it to have something that will take me to the next valid
record.

(I am assuming that you actually want the books by the author, not the
author's name...)

You are now in the land of the Query: you want to filter the Books table
by a criterion based on the Author. At its simplest this is:

SELECT AccessionNumber, ISBN, Title, Abstract, DeweyCode
FROM Books
WHERE Author LIKE "Dav*"
ORDER By AccessionNumber

but if you have a more flexible database (e.g.separate tables for
Authors, WritingCredits, Volumes, and so on) then it's likely to be a bit
more complex. You can also make the look-up part into a parameter and get
a new value from the user every time.

When you have created the query, then you can do one of:
Display it as a datagrid to the user (least useful)
Use it as the recordset of a form (most useful)
Print it out as report (best if you only need to read the result)
etc

In short, what you want is very easy to do, but we'll need a bit more
information about what you are trying to do.

Hope that helps


Tim F
 

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