Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 09:59 AM
John M
Guest
 
Posts: n/a
Default Sorting records using visual basic

I can open a form using a combo box to select a group of records.

stLinkCriteria = "[Tu]= '" & Me![PrintTu] & "'"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

[PrintTu] is what comes from the combo box.

I would also like the records to be sorted in an order not the same as the
underlying table. I would imagine this should be simple, but to me, and
amateur, it's not!

Thanks in advance for any help.


  #2  
Old November 13th, 2005, 09:59 AM
Allen Browne
Guest
 
Posts: n/a
Default Re: Sorting records using visual basic

See:
Sorting Records in a Report at run-time
at:
http://allenbrowne.com/ser-33.html

The article explains how to programmatically set the ControlSource of the
GroupLevel in the report's Open event.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John M" <john@jmawer.demon.co.uk> wrote in message
news:d3qkr9$h7d$1$8302bc10@news.demon.co.uk...[color=blue]
>I can open a form using a combo box to select a group of records.
>
> stLinkCriteria = "[Tu]= '" & Me![PrintTu] & "'"
> DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
>
> [PrintTu] is what comes from the combo box.
>
> I would also like the records to be sorted in an order not the same as the
> underlying table. I would imagine this should be simple, but to me, and
> amateur, it's not!
>
> Thanks in advance for any help.[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles