Question Locked

Microsoft Access Question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi all, I have a Microsoft 2007 database that I have created to store Real Estate information, contacts, address, notes etc. My question is; when I open the address book form, which is essentially just a long list of addresses and then sort those contacts by a particular field, say last name for example, then doubleclick on one of the contacts to view more information (a prompt type window appears), then close the prompt window, the sort that I applied to the form has been reset, so it returns to normal. Is there any way to get it to hold the sort even after opening and closing a contact details window?

Thanks in advance for your help.

Patrick

3 replies

by tony hopkinson

Your query initial query is re-executing. This could happen if say it's triggered by showing of the form. This event fires every time the form gets focus which it will when you get focus back from your Contacts dialog.

You could stop that from happening by moving the code, by setting a flag after the first show, so it didn't do it again.

Another idea would be to store the sort, initialise it what ever the default is and always get the data by the 'current sort'.

That would be my choice as it provides you with all sorts of potential bonus features, like user preferences, and resorting based on a change of the information being sorted.

HtHs

This discussion is closed to new replies.