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

Sort query from Form

P: n/a
JCA
I am not sure why this is not working. This is the code that I am
using in my form for this button but I am still not getting the option
to sort it when I run it. I would really appreciate any help I can
get.

Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

Dim stDocName As String

stDocName = "Create Need to Create FG WO Report"
DoCmd.RunMacro stDocName

Me.OrderByOn = True
Me.OrderBy = "[What field do you want to sort by?]"
Me.Requery

Exit_Command15_Click:
Exit Sub

Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click

End Sub

Thanks a bunch,

JCA
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I think you have to specify the field some other way... try a listbox
or combobox... and then build a valid ORDER BY clause... then use that
as your filter.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.