Small, Probably the Most Basic Question You'll ever Hear

  • Thread starter Thread starter Daryl88
  • Start date Start date
D

Daryl88

Guest
Hey, I'm doing Computing as an A-Level and we have project to do over Christmas and I need some small help writing the queries.

Basically I have to do an Examination's Board Database. It has to store the Candidates that are going for exams, what their Centre (School) Number is, what exam they're taking and so on. It has to be able to produce four reports.

One of these reports have to show every examination that is taken for a particular centre. I am using the variable "Ce_No" for Centre Number. And I have five different Centre Numbers being used. I want it so that when I open my Query it asks me to type in a centre number, then when I've typed it in and clicked "ok" it will show me every exam being taken by people in that centre. I'm hoping this makes sense.

In my query I have added all the information I want to use, I know I have to type something in for "Ce_No" in the "Criteria" bit, but I don't know what... I'm hoping this makes sense.

Basically, I want it so that when I type in a number, everything thing with that number as it's primary key comes up but nothing else.

Please help! :D

Thanks,

Daryl ^_^
 
You can filter a query by going to the field you want to filter and in the criteria section enter;

Code:
[Enter the criteria]

or you could enter something more useful ;-) Another way is to set up a query to search through a field and group on unique values. Then make a form with a combo box (drop down list) where you can select the criteria, then use that as a filter. You can then also call your reports from this form. I would advise you to look at the Northwind database which comes with Access to get some ideas of the possibilities there are for you.
 
OK thanks, but what do you mean when you say [enter the criteria]? sorry.
 
An input box will pop up and have that above the area where you type in. Just give it a go and you will see what I mean.
 
Okt hanks for your help but what do you mean by [Enter the Criteria]?
 
What he means about Enter Criteria

On the Criteria line of the Query Design Grid, if you enter something inside of brackets (eg: [Something]), a message box will pop up to prompt the user at the time the query is run.

For example, if you wanted to filter records by Centre Number, you could write:

[Enter Centre Number]

on the criteria line of the ce_no field. When a user runs the query, a message box will pop up that says "Enter Centre Number" with a data-entry box for the user to enter the number. When the user enters a number and clicks OK, the query will run based on the number they enter.
 

Users who are viewing this thread

Back
Top Bottom