Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Print order by Date

0 views
Skip to first unread message

Bob

unread,
May 18, 2007, 9:33:14 PM5/18/07
to

At the moment this code prints in order of the latest tblRemarks.dtDate, if
there is no date can the print order by tblRemarks.Category
(Asending)...Thanks for any help...Bob

SELECT tblRemarks.dtDate, funGetHorse(0,tblHorseInfo.HorseID,false) AS
HorseName1, tblRemarks.Category, tblRemarks.Remark FROM tblRemarks ,
tblHorseInfo,qryCategory where tblRemarks.HorseID=tblHorseInfo.HorseID and
qryCategory.HorseID = tblHorseInfo.HorseID and qryCategory.dtdate1 =
tblRemarks.dtDateORDER BY tblRemarks.dtDate DESC;


Bob

unread,
May 18, 2007, 9:35:52 PM5/18/07
to
Oops sorry here is the Private Sub
Private Sub Report_Open(Cancel As Integer)
Category.ControlSource = "='" & Form_frmMain.cbCategory & "'"
Me.RecordSource = "SELECT tblRemarks.dtDate, funGetHorse(0,
qryCategory.HorseID,false) AS HorseName1, " _
& " tblRemarks.Category, tblRemarks.Remark FROM tblRemarks, qryCategory
WHERE qryCategory.HorseID " _
& " = tblRemarks.HorseID And qryCategory.RemarkID1 = tblRemarks.RemarkID
" _
& " and tblRemarks.Category='" & Form_frmMain.cbCategory & "'" _
& " ORDER BY tblRemarks.dtDate DESC; "
Debug.Print Me.RecordSource
End Sub

Thanks Bob

"Bob" <x...@xx.xx> wrote in message news:f2lk0p$3pr$1...@lust.ihug.co.nz...

Tom Wickerath

unread,
May 18, 2007, 10:45:01 PM5/18/07
to
Hi Bob,

You need to use View > Sorting and Grouping within report design view to
specify sorts. Reports will not honor sort orders specified in the
recordsource.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

JK

unread,
May 18, 2007, 10:45:41 PM5/18/07
to
Bob,

ORDER BY tblRemarks.dtDate DESC, tblRemarks.Category;

Regards
Jacob

"Bob" <x...@xx.xx> wrote in message news:f2lk5s$3qh$1...@lust.ihug.co.nz...

Bob

unread,
May 19, 2007, 1:06:21 AM5/19/07
to
Thanks Jacob, and then Remark field next to ascending
ORDER BY tblRemarks.dtDate DESC, tblRemarks.Category; tblRemarks.Remark
ASCENDING ???
Regards Bob


"JK" <nob...@home.now> wrote in message
news:OBryM$bmHHA...@TK2MSFTNGP03.phx.gbl...

Bob

unread,
May 19, 2007, 1:09:39 AM5/19/07
to
Got it but dont know the short cut to Ascending for Remark
& " ORDER BY tblRemarks.dtDate DESC,tblRemarks.Remark DESC,
tblRemarks.Category ;"
Thanks Bob

"Bob" <x...@xx.xx> wrote in message news:f2m0gh$q6h$1...@lust.ihug.co.nz...

Bob

unread,
May 19, 2007, 2:01:44 AM5/19/07
to
Thanks got it ASC...Bob

"Bob" <x...@xx.xx> wrote in message news:f2m0md$qkn$1...@lust.ihug.co.nz...

Douglas J. Steele

unread,
May 19, 2007, 6:33:19 AM5/19/07
to
Did you not read what Tom posted? It doesn't matter what ORDER BY clause you
have on the query when dealing with a report. You MUST use the Sorting and
Grouping feature of the report.

(And, for what it's worth, Ascending is the default, so it's not really
necessary to include the ASC in a query)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Bob" <x...@xx.xx> wrote in message news:f2m3o2$vu3$1...@lust.ihug.co.nz...

Bob

unread,
May 19, 2007, 6:06:48 PM5/19/07
to
Douglas, Tom Who, I can not see a posting on this tread from Tom!
and I can assure you that the 2nd list being Remarks was not in any
alphabetical , Thanks Bob

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:O2mjkEg...@TK2MSFTNGP05.phx.gbl...

Douglas J. Steele

unread,
May 19, 2007, 9:34:19 PM5/19/07
to
Tom Wickerath

Entry 3 in the thread as displayed here:
http://groups.google.com/group/microsoft.public.access/browse_frm/thread/d5d2bde62df2ed82/3b1e865bc1787bc9?lnk=st&q=&rnum=1#3b1e865bc1787bc9

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Bob" <x...@xx.xx> wrote in message news:f2ns9h$7hb$1...@lust.ihug.co.nz...

Bob

unread,
May 19, 2007, 10:19:57 PM5/19/07
to
Sorry Douglas I am using Microsoft Outlook Express and not showing here,
thanks Bob

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message

news:OdoIh%23nmHH...@TK2MSFTNGP06.phx.gbl...

rjv...@ihug.co.nz

unread,
May 19, 2007, 10:36:35 PM5/19/07
to
Ok sorry Now I can see it through Google....Bob

Tom Wickerath

unread,
May 19, 2007, 10:56:48 PM5/19/07
to
Hi Bob,

You might want to try switching your newsgroup server to news.microsoft.com.
My contribution to your thread is showing up on that server.

Tom Wickerath

PS:

This message posted using the news server "newsgroups.comcast.net", just in
case you are not seeing any messages posted to news.microsoft.com. Also,
here is a link to your thread using the Microsoft "web portal":

http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.access&mid=11bdab57-bf7b-4fe5-bf7e-19287900215e

____________________________________________

"Bob" <b...@the.races> wrote in message news:f2ob4b$30e$1...@lust.ihug.co.nz...

Bob V

unread,
May 20, 2007, 1:01:50 AM5/20/07
to
Thanks Tom I see you now on msnews.microsoft.com...Bob
"Tom Wickerath" <aos168b at comcast dot net> wrote in message
news:nZKdnWlpTKR_JdLb...@comcast.com...
0 new messages