jadeIT
Systems Analyst
- Local time
- Today, 15:51
- Joined
- Jul 16, 2002
- Messages
- 50
i am trying to use the orderby property of a report in microsoft access, but i just doesnt seem to have any effect?
i have set order BY on = true in the settings dialog in design mode
I have a form which allows the user to select a field by which the report will be ordered by.
in code i am doing the following:
Dim stDocName As String
stDocName = "MerchandiseSalesReport"
Select Case Frame21.Value
Case 1
Reports!MerchandiseSalesReport.orderBy = "[created] ASC"
DoCmd.OpenReport stDocName, acPreview
Case 2
Reports!MerchandiseSalesReport.orderBy = "[supplier] ASC"
DoCmd.OpenReport stDocName, acPreview
[...etc....]
Case Else
MsgBox "none"
End Select
however, the report loads in the same default order everytime...
i checked the orderBy value in run-time in the immidiate window and it is correctly set to what the code set it to .
i have set order BY on = true in the settings dialog in design mode
I have a form which allows the user to select a field by which the report will be ordered by.
in code i am doing the following:
Dim stDocName As String
stDocName = "MerchandiseSalesReport"
Select Case Frame21.Value
Case 1
Reports!MerchandiseSalesReport.orderBy = "[created] ASC"
DoCmd.OpenReport stDocName, acPreview
Case 2
Reports!MerchandiseSalesReport.orderBy = "[supplier] ASC"
DoCmd.OpenReport stDocName, acPreview
[...etc....]
Case Else
MsgBox "none"
End Select
however, the report loads in the same default order everytime...
i checked the orderBy value in run-time in the immidiate window and it is correctly set to what the code set it to .