470,613 Members | 2,344 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

OpenForm

Excuse the tail of questions ... thanks for previous answers

DoCmd.OpenForm "FormName", acNormal , , StLinkCriteria, acFormReadOnly

works fine with StLinkCriteria as [NegBehave].[TutorGrp]= '" &
Me![SelectGrp] & "'" (Select gop being from a combo box)

I would have though if i had wanted to sort it I would just add (with a
space) .....

Order By [NegBehave].[" & SortField & "] DESC" (Where sort field is the
field selected by the user.
Nov 19 '06 #1
1 3921
You can set the sorting after you OpenForm:
DoCmd.OpenForm ...
With Forms("FormName")
.OrderBy = "[MyField] DESC"
.OrderByOn = True
End With

--
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.

"JohnM" <jo**@jmawer.demon.co.ukwrote in message
news:ej*******************@news.demon.co.uk...
Excuse the tail of questions ... thanks for previous answers

DoCmd.OpenForm "FormName", acNormal , , StLinkCriteria, acFormReadOnly

works fine with StLinkCriteria as [NegBehave].[TutorGrp]= '" &
Me![SelectGrp] & "'" (Select gop being from a combo box)

I would have though if i had wanted to sort it I would just add (with a
space) .....

Order By [NegBehave].[" & SortField & "] DESC" (Where sort field is the
field selected by the user.

Nov 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by datactrl | last post: by
15 posts views Thread by Thelma Lubkin | last post: by
2 posts views Thread by Mike | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.