From: Gal on
How to write in Access a "find" sentence, that finds a specific record in a
table (according to one of the fields) and displaya data from other fields?
(Eg the user enters the IDnumber of a book, and gets a message box with the
name of the book)

--
Gal
From: RonaldoOneNil on
Look in Help at the DLookUp function

Msgbox DLookUp("BookName","BooksTable","IDNumber = " & IDNumber)

"Gal" wrote:

> How to write in Access a "find" sentence, that finds a specific record in a
> table (according to one of the fields) and displaya data from other fields?
> (Eg the user enters the IDnumber of a book, and gets a message box with the
> name of the book)
>
> --
> Gal
From: John W. Vinson on
On Tue, 16 Mar 2010 02:45:01 -0700, Gal <Gal(a)discussions.microsoft.com> wrote:

>How to write in Access a "find" sentence, that finds a specific record in a
>table (according to one of the fields) and displaya data from other fields?
>(Eg the user enters the IDnumber of a book, and gets a message box with the
>name of the book)
>

No "code" is needed. The tool for what you describe is a Query.

Create a new Query based on your table. Put a criterion on the Criteria line
under the IDnumber field, and include all of the fields that you want to see.

This type of query is *absolutely fundamental* to any productive use of
Access, and can and should be made much more elaborate.

You might want to check out some of the tutorials here:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

--

John W. Vinson [MVP]
From: Gal on
thank you very much
it worked !
--
Gal


"Gal" wrote:

> How to write in Access a "find" sentence, that finds a specific record in a
> table (according to one of the fields) and displaya data from other fields?
> (Eg the user enters the IDnumber of a book, and gets a message box with the
> name of the book)
>
> --
> Gal