By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,499 Members | 829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,499 IT Pros & Developers. It's quick & easy.

Updating Query After Data Entry for Listbox

P: n/a
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.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

Nov 12 '05 #2

P: n/a
If you create a Form for the Student Information, you can create a ComboBox
with Row Source of Student ID and Name, with Student ID as the bound Field.
One of the Options in the Combo Box Wizard is to locate the record on this
Form.

In an application, you don't want the users to have to run queries directly.
In fact, you don't want to give the users datasheet view of either queries
or tables, because there are too many things they can accidentally do wrong.

Larry Linson
Microsoft Access MVP

<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.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.