What you will need to do is create a new query based from the Student_table.
Then when you have your
list of available fields, drag these fields into the query builder below.
Once you have all the
fields within your query you need to set criteria. As you want to search by
student ID numbers, you
will need to enter this into the criteria of the student ID field [Enter
student ID]. When you run
this query, a message box will appear asking "Enter student ID". Once the
user enters the ID number,
all records containing this ID will be displayed.
This is just a hunch but I am assuming that each student will have their own
unique student ID. If
this is the case then once the student ID has been entered, only one record
will be returned.
Once you have the quart saved, go to the form you want to add a button which
will run the query and
then click on the command button from the toolbar. drag it out on the form
and then use the wizard
to create the command. Once the button has been placed on the form you will
need to select
"Miscellaneous" from the categories list and then "Query" from the actions
list. Click on "Next" and
then select the name of the query you have just saved.
Hope this helps and if it doesn't, don't hesitate to reply.
Mark
<Sami> wrote in message news:m3********************************@4ax.com...
I am creating a student database. We would like to be able to look up
students by ID number. New students will be input to the tables /
records daily, but looking up student by ID number will be the method.
Consequently, to run a query and to sort ID numbers in ascending order
seems to be the way we need to go, so the person looking up a student
by ID could type in the number 1 and get all the ones with the number
1. How could a query be made to run automatically from the
switchboard, or would it be necessary to open the query, hit the
exclamation point, and run it that way . . . or a macro? Any other
suggestions?
Please spell steps out specifically! I am a novice!
Thanks.