Connecting Tech Pros Worldwide Help | Site Map

Sorting records using visual basic

  #1  
Old November 13th, 2005, 09:59 AM
John M
Guest
 
Posts: n/a
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

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]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net frameword Resources ( vb.net , asp.net etc...) shamirza answers 0 January 17th, 2007 08:05 AM
Custom Row Functions: Access vs. SQL Server TC answers 22 November 20th, 2005 11:45 PM
same server method being called regardless of sender Ryan McLean answers 1 November 18th, 2005 02:37 AM
Automatically Sort Table when Table is Opened in Project Matt answers 4 July 20th, 2005 05:04 AM