473,503 Members | 3,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating Query After Data Entry for Listbox

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
2 1933
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2862
by: Jeremy Wallace | last post by:
I have a ton of queries that I need users to be able to view. I'd like to have them viewed in a datasheet-view form instead of directly, so that I can keep the users from futzing with the data. ...
7
2571
by: Dave Hopper | last post by:
Hi I posted a question recently regarding problems I am having getting a value from a list box to use in a query. I got a lot of help, for which I thank you and it's nearly working! But I need...
3
9404
by: gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post by:
I have a ListBox built of a simple custom object for the ListItems used to be able to hold a Data Value, and a Display Value, with accessors for each. I have overridden the ToString method to...
1
1784
by: VB Programmer | last post by:
I have a listbox which is data bound to a query that incorporates several tables. I want to be able to update the listbox with new items (from another "master" listbox), remove existing items,...
1
3032
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to...
34
10766
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
6
1919
by: Brian Blair | last post by:
I have created a input form that enters a number in a talble. If I open the form again it enters a new record instead of editing the existing record. It seems like it should be very basic but I...
1
1539
by: marcf | last post by:
Hi everyone, I'm probably being dim here but here's my problem. My main form opens a subform for a user to add notes, when they click save it does the following: ...
1
2348
by: jonbartlam | last post by:
Hi There I'm not sure what exactly is going wrong here. I'm writing an application that retreives a table from a database (tbl_internalfaults) and updates it. (Actually, just the status column will...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.