Orderby is not working

J

JString

If anyone can help, I would really appreciate it.

I have a main form with a handful of subforms that all share the same SQL
statement as a recordsource. I also developed a system to synchronize these
subforms so that any time a record is selected or sort order changes, etc,
these changes will be propogated to each of the other subforms.

Now everything works fine until a certain point. Generally, this is what
happens:
1. I build a new SQL statement
2. New SQL statement is applied to the recordsource property of all subforms.
3. I click a sort button.
4. Orderby property is propogated to all subforms
5. I click on a custom 'remove filter' button which performs these steps:
a. Grabs the original SQL statement
b. propogates this statement to all subforms

The problem is that once this is all finished, the first subform is always
sorted, but the others are not. Also, a debugging procedure prints that they
all have orderby set to the last field that was being sorted and orderbyon is
TRUE for each one. So if these properties are set why are 4 out of 5
subforms not sorted???

I even checked the original state of the one subform that is always ending
up sorted and its default property values are empty. The only difference
that I can think of between this one form and the rest is that it is the only
one that is displayed as a continuous form.

Does anyone have any thoughts on what the problem could be??

Many thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top