If you are dealing with a Recordset, it resulted from some query. All you have to do is to pass the
same SQL to Crystal, whether as a SelectionFormula or as SQLQuery properties.
Quote:>Does anyone have a suggestion on how to generate a report from the results
>of a list box. We want to have one report with the results of everyone who
>shows up in the list box? The results in the list box were generated from a
>recordset if that helps. Right now we have it working individually but
>don't want to waste all this paper!! Any help would be greatly appreciated!
I am having problems with passing SWL results to list boxes now that I
have sorted out the SQL statement (Thanks to a little help) The code I
am using follows, and the results that I am getting is the SQL statement
in the list box, rather than the results!
Dim SQL As String, SDeskDB As Database, TempDatabase As Database,
DefaultWorkspace As Workspace, Rs As Recordset
Set SDWorkspace = Workspaces(0)
Set SDeskDB = SDWorkspace.OpenDatabase("c:\sdeskgs\sdesk.MDB",
SQL = "SELECT Contacts.ConSur FROM Contacts ORDER BY Contacts.ConSur;"
Set Rs = SDeskDB.OpenRecordset(SQL, dbOpenSnapshot)
If Rs.RecordCount <> 0 Then
lstContact.AddItem (Rs.Name) & ""
lstContact.AddItem "No Contacts Found"
Thanks for any help in advance