I meant a custom command button. If you're not using one, then I'm not sure
where the prompt is coming from. When you close a form using the built-in
close button Access usually, in my experience, just goes ahead and saves the
Order By (and Filter) properties without prompting. One way to prevent this
from happening is to leave the Record Source property of the form empty in
design view, and set it in code in the Open event of the form ...
Private Sub Form_Open(Cancel As Integer)
Me.RecordSource = "tblTest"
End Sub
Access will not then attempt to save the Order By or Filter properties.
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.