Sorting a table, apply the sorting to a form

jh_

New member
Local time
Today, 01:33
Joined
Mar 9, 2006
Messages
5
Hi all.
I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number.
I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.

Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..

I'd apreciate some help with this :) Thanks

Here's the database
 

Attachments

Last edited:
I'm sorry to bump this, but I'd apreciate some help :) I'm stuck :confused:
 
Firstly a question. Why do you have separate forms for Adding, Viewing and Changing records. these can all be done in a single form!

You need to change the RecordSource of the form from being the underlying table to a query that is sorted by department.
 
Fear Naught said:
Firstly a question. Why do you have separate forms for Adding, Viewing and Changing records. these can all be done in a single form!

You need to change the RecordSource of the form from being the underlying table to a query that is sorted by department.
As I'm pretty new in access, I didn't know of any other way to do this on. I have one form to add (this will automaticly go to a new record when I enter it), then I have one form to view (in this there's not possible to change any data), then I have one to edit (this starts up on post 1, then I can edit all existing departments). Is it a bad thing to have 3 separate forms?

Thanks for the answere, I think this will help :)
 
Having more forms than you need makes it harder for you as the designer when upgrading. In your scenario you would have to change all three forms making consistency a real issue.

The best way if you really need the different view is to change the way a single form works when it opens. You can set AllowEdits to False or True depending on how it opens etc etc.

There will no doubt be plenty of examples in these forums showing how to do it.


Good Luck :)
 

Users who are viewing this thread

Back
Top Bottom