By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,686 Members | 2,708 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,686 IT Pros & Developers. It's quick & easy.

A2K - keeping subform records in the same order

P: n/a
Hi,

I was just setting up a test system on a client's machine yesterday and as
ever noticed a few problems.

One that has thrown me is to do with the order of records in a subform
(datasheet view).

The main form holds the parent records. For each parent record there are 10
(and always 10) related records. When these 10 records appear in the
subform the first field is numbered from 1 to 10.

Like so:

1 - record here
2 - record here
3 - record here
4 - record here
5 - record here
etc to 10

Yesterday I noticed that sometimes the order was changed, eg.

10
9
8
1
2
3
4
5
6
7

There is quite a bit of complexity behind the whole thing but I don't want
to confuse the issue. Is there a relatively simple way of checking the
order of records as they appear in the subform and then re-ordering them if
necessary?

Many thanks again,

Martin
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Set the subform's OrderBy property to the name of this field, remembering to
set OrderByOn as well. If necessary, do this in the Open event of the
subform.

Example:
Me.OrderBy = "SomeField"
Me.OrderByOn = True

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"Deano" <ma************@hotmail.com> wrote in message
news:e2***************@wards.force9.net...
Hi,

I was just setting up a test system on a client's machine yesterday and as
ever noticed a few problems.

One that has thrown me is to do with the order of records in a subform
(datasheet view).

The main form holds the parent records. For each parent record there are 10 (and always 10) related records. When these 10 records appear in the
subform the first field is numbered from 1 to 10.

Like so:

1 - record here
2 - record here
3 - record here
4 - record here
5 - record here
etc to 10

Yesterday I noticed that sometimes the order was changed, eg.

10
9
8
1
2
3
4
5
6
7

There is quite a bit of complexity behind the whole thing but I don't want
to confuse the issue. Is there a relatively simple way of checking the
order of records as they appear in the subform and then re-ordering them if necessary?

Many thanks again,

Martin

Nov 12 '05 #2

P: n/a
Allen Browne wrote:
Set the subform's OrderBy property to the name of this field,
remembering to set OrderByOn as well. If necessary, do this in the
Open event of the subform.

Example:
Me.OrderBy = "SomeField"
Me.OrderByOn = True


Thanks Allen, that looks like what i need - hopefully a simple fix to an
irritating problem.

<my original post snipped>
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.