Adding an Index to a report in VBA

  • Thread starter Bob via AccessMonster.com
  • Start date
B

Bob via AccessMonster.com

I have developed an application which, among other things, uses DoCmd.,
OpenReport to display a report selected from a list. Prior to that the
application has assembled both WHERE and ORDER BY strings for the sequel
command. DoCmd.OpenReport has a parameter for including the WHERE string but
I can't find a means of including the ORDER BY index instruction. Any clue
would be appreciated.
 
T

Tom Wickerath

Hi Bob,

Reports do not use sorting that is specified in an underlying query. You
need to use the Sorting and Grouping option in report design view (View >
Sorting and Grouping) to specify the sort. I believe you can access this
programmatically, but I'd don't have a sample handy at the moment.

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

I have developed an application which, among other things, uses DoCmd.,
OpenReport to display a report selected from a list. Prior to that the
application has assembled both WHERE and ORDER BY strings for the sequel
command. DoCmd.OpenReport has a parameter for including the WHERE string but
I can't find a means of including the ORDER BY index instruction. Any clue
would be appreciated.
 
Top