Need user friendly sorting of a report using a sort by list...

comptechbranden

Registered User.
Local time
Today, 12:01
Joined
May 25, 2006
Messages
119
Ok, I am a noob at reports and did a search on this. My searching DID NOT HELP ME! I thought I would make that clear :D Maybe someone can tell me what to look at for this issue.

I need to take one report, allow the users to easily use a dropdown or listbox on a form to Sort and Group many fields of data. To recap: The user will click on name in the list and it will sort report by name. Also I need them to be able to select up to three sort criterias.

EX: Sort by Name then LastName then Company

Please guide me to the answer. Thanks.
 
If you go to Microsoft's website you can DL their samples that deal with Reports/Query/Forms. In the Report sample there's an example of using that shows how to filter a report using a popup form and an example that shows how to order a report using a popup form. I'm not sure if this is exactly what you're looking for, but it's definately worth a look.

http://office.microsoft.com/en-us/assistance/ha011201381033.aspx
And then there's also links in the samples to a topic on each sample
IE Filter with a popup form.
http://support.microsoft.com/default.aspx?scid=kb;en-us;208529&Product=acc
 
Thanks man. That is what I am looking for. Hopefully it works in access 97...
 
On that popup form (second link) I get error 13 Type Mismatch!

This is the full code:
Private Sub Set_Filter_Click()
Dim strSQL As String, intCounter As Integer

' Build SQL String.
For intCounter = 1 To 5
If Me("Filter" & intCounter) <> "" Then

strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " _
& " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & "" _
And ""
End If
Next

If strSQL <> "" Then
' Strip Last " And ".
strSQL = Left(strSQL, (Len(strSQL) - 5))

' Set the Filter property.
Reports![Project List].Filter = strSQL
Reports![Project List].FilterOn = True
End If
End Sub

This is the code it highlights:

strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " _
& " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & "" _
And ""
 

Users who are viewing this thread

Back
Top Bottom