By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 3,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

OpenForm

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.