G
Guest
I have a report that has been working fine. VBA code sets the RecordSource
conditionally as follows:
Me.RecordSource = _
SELECT [tbl_Accounts].* FROM [tbl_Accounts] ORDER BY [AccountNo]
(if user chooses to sort by Account number)
Me.RecordSource = _
SELECT [tbl_Accounts].* FROM [tbl_Accounts] ORDER BY [Lastname]
(if user chooses to sort by Last name)
Now I have added a Report Footer which has one control in it whose Control
Source is:
=Count([AccountNo])
As soon as I add this Report Footer, the "ORDER BY ..." is being ignored in
the report RecordSource. If I remove the Report Footer, then the
RecordSource ordering works fine again.
(The AccountNo field is a table key field.)
Any ideas why this is happening?
ctdak
conditionally as follows:
Me.RecordSource = _
SELECT [tbl_Accounts].* FROM [tbl_Accounts] ORDER BY [AccountNo]
(if user chooses to sort by Account number)
Me.RecordSource = _
SELECT [tbl_Accounts].* FROM [tbl_Accounts] ORDER BY [Lastname]
(if user chooses to sort by Last name)
Now I have added a Report Footer which has one control in it whose Control
Source is:
=Count([AccountNo])
As soon as I add this Report Footer, the "ORDER BY ..." is being ignored in
the report RecordSource. If I remove the Report Footer, then the
RecordSource ordering works fine again.
(The AccountNo field is a table key field.)
Any ideas why this is happening?
ctdak