Record Order

steveP123

New member
Local time
Today, 19:09
Joined
Feb 19, 2004
Messages
6
I have a databse for orders and quotes. It is based on the order entry tempplate database.

When I am on my customer page and select my quote page, it opens the quote form and displays only the record of the quotes associated with the customer from the previous page.
The problem I have is that I can not get the record order to start at the begining... the first record I see is that either above the customer ID.

How can I make it start at the first (or last) quote for that particular customer. I have been able to create navigation buttons that advance by one. It's confusing as the quoteID stars at say 5 (which is the customerID) then 7, 1, 2 and says I've reached the end. I'd prefer it to start 1,2,5,7

Thanks
 
OK, an object lession in queries and tables.

A table has records that appear in the order they were entered. Regardless of the order in which their prime keys specify. When you view a datasheet of the table, Access consults the prime keys and does an implied sort to show the records in prime key order. You can, however, sort by other fields in table view. If the table has NO prime key (which is not recommended but which happens anyway), then without a specified sort order, you have no predictability for order of record presentation.

A QUERY does the same thing. If you open the query in datasheet view and no sort order has been specified, you see the records in the order of the table's prime key, rather than say, your customer number. If the table has no prime key, you cannot predict the order there, either. You can, however, SORT the fields in the query to present them differently than the table would show them.

The moral of this story: Never assume Access knows anything about order. If you don't tell it the order you want to see, you won't see it. Whether by defining a prime key or simply by selecting SORT order in the query grid, you have the ability to define what you want to see and when you want to see it.

Therefore, if you want to see something by customer and by quote order, sort by customer first and quote order next.
 
Thanks for the info

The tables all have the primary keys and the quotes are entered sequentially with the quote ID being the primary key.

In the query for filtering the quotes based on the customer ID I have tried the sort commands by either ascending or descending and all this does is incrent up / down from the QuoteID either equal or afetr the customer ID

e.g - if asceding = 5,7,1,2 then no more record
- if descending = 5,2,1,7 then no more records
 
DOC MAN

Managed to get it sorted out based on one of the comments you made.

I switched to datasheet view and set the order in that then switched back to for view and saved it.

It worked

Many thanks indeed
 

Users who are viewing this thread

Back
Top Bottom