I created a form from a database, after typing in several record I noticed
that the order had changed I need to keep the records in the order they are
typed.
please help
Access records are stored in no special order. If you require a
special sort order (i.e. in the order entered), you need to create a
field that indicates when the record was entered and sort on that
field.
Add a new field to your table.
Name it WhenEntered, Date/Time datatype, General Date format.
Create a query using this table as record source.
Include all the fields. Set the Sort order on the WhenEntered field.
Use this query as the form's record source.
If you wish, you can add this [WhenEntered] field to the Form.
Lock the control.
Code the Form's BeforeUpdate event:
If Me.NewRecord = True then
Me![WhenEntered] = Now
End If
Each new record will have the current date and time entered into this
field.
Note: this will only affect newly entered records, not already
existing ones. You can run an Update query on existing records to give
them a sort order before starting with entering new ones.