top
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Top 10

Top 10

resolvedResolved · Medium Priority · Version 2003

replyReply Tue 27 Jan 2009, 15:49Delegate hakeem said...

hakeem has attended:
Access Introduction course

Top 10

How can I create an Access Database query that will give top a 10 or 20 by a particular value, without having to sort in descending order?

For upcoming training course dates see: Pricing & availability

replyReply Wed 28 Jan 2009, 16:01Trainer Rajeev said...

RE: Top 10

Dear Hakeem

Thank you for attending Access Introduction course!! I hope you enjoyed the course and benefited from it.

I am not 100% sure what is it that you are looking to achieve from the query. I'll try to guess to the best of my ability and also provide an answer for it. If it doesn't answer your question I would request you to reply and may be provide some example to make things a bit more clearer for me.

I assume that what you want is that whenever somebody enters an amount the results that display matches the criteria that the user enters.

To do this you would have to create a Parameter query. This is normally covered in our Intermediate course but they are quite easy to create.


Let's assume that you have the following fields:

Name DOB Salary


Let's assume that you have various records in these fields.

You would create a new query.

Download the fields in the grid box so that they appear in your result view.

Let's assume that you wanted to put a criteria for salary where whatever value the user enters when they run this query the result that appear match that and any salary which is greater than that value.


In the Criteria box for the salary you can simply type in >=[Please enter Salary which equals or is more than]

Please note that Square brackets need to be used.

If you wanted less than or equal to the salary then you would simply replace >= with <=

If you wanted the user to enter two separate values and get all the salaries between these two values then you would put the following in the criteria box of the salary field:

between [Please enter the lower value] and [Please enter higher value]

I hope this has answered your query.

If this has answered your query then I would request you to please mark the question as resolved!! If not and you have a specific question related to this then please post it as a new question and we should be able to provide you the solution for it!!

Kindest Regards


Rajeev Rawat
MOS Master Instructor 2000 and 2003
MCAS Master Instructor 2007

replyReply Wed 28 Jan 2009, 16:10Trainer Rajeev said...

RE: Top 10

Dear Hakeem

Reffering to my earlier post I am very sorry because I started talking about Excel when the question was more related to Access!!

I think you'll have to give me an example of this so that I can be clear before giving you the relevant answer!!

Don't worry I'll try to stick to MS Access this time and not MS Excel :)



Kindest Regards


Rajeev Rawat
MOS Master Instructor 2000 and 2003
MCAS Master Instructor 2007

Tue 3 Feb 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
access class ms training and other Microsoft training courses.

Access tip:

Create a custom Close button on a Form

By default, Forms that you create in Access have a full set of control buttons, that is, a title bar with Minimize, Maximize and Close buttons in the top right-hand corner and a Control Menu in the top left-hand corner.



Sometimes Access needs to follow certain procedures or events as users close a Form (such as automatically opening another Form perhaps). So it is often a good habit to create a custom Close button on a Form for everyone to use, rather than the standard closing cross.



To create a custom Close button:

1) In Form Design View, draw a Command Button onto the Form.

2) Use the Command Button Wizard to select Form Operations under Categories, and Close Form under Actions.

3) Choose Finish.



Access then creates the button and code to close the form for you. You can add any extra code that needs to run as the Form closes to the same Close procedure.



However, the creation of a custom Close button is pointless if the closing X in the top right-hand corner of the Form remains active. To make the closing X inactive, open the Form Properties box then on the Format tab set the Close Button setting to No. This will grey out the closing X leaving it visible, but inactive.



View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard