Navigation problem

G

Geoff

Hi all.
I have a problem with a database that I want to edit etc with a form. I
inserted buttons for next record etc. Unfortunately I want to be able to goto
the next alphabetical record (Surname) but of course the navigation buttons
work on record numbers. Is there some way an absolute novice like me can
achieve "next record" by alphabetic sort?
 
M

MikeJohnB

I'm not positive I know what you are trying to do from your description.
However, if you base the form on a query, you can sort the query in ascending
Name order which will then present the records to the form in that order
instead of entry order.

With the query in design mode, select, SORT Ascending in the Surname Column

Does this help???

Regards
Mike B
 
L

Linq Adams via AccessMonster.com

My guess is that you've based your form directly on a table Your problem here
is just one of a myriad of reasons why all forms should be based on queries,
even if the query only involves one table.

Create a query based on your table. Use the Query Wizard if you need to.

Open the query in Design View

Looking Left-to-Right, you should have SurName - FirstName

In the Sort Order field for each select Ascending

Save the query

Open your form in Design View

Goto Properties - Data

Change RecordSource from your table to the newly created query

When you run form now the records should be sorted by SurName then by
FirstName.
 
G

Geoff

Thanks Mike for the incredibly fast reply. By the way I forgot to mention
that I am using Access 2007 (if that makes a difference).
I will give that a go and see what happens.
Thanks again
Geoff
 
M

MikeJohnB

You should still be able to base your form on a query in access 2k7 and the
same applies to setting the sort order for (Surname) Field in the query. I
always base forms on queries because you always find someone wants the form
to display in a different order at some time. Also, you can limit the number
of records displayed, perform calcs and do a lot of other things that you
cant do when the form is based on the table. The next record buttons should
still work but will obviously present the next ascending surname order
instead of the record order number.

Kindest regards

Mike B
 
G

Geoff

You guys are brilliant!
Thanks very much. It becomes so obvious when it is set out like that.
Very best regards
Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top