When I arrange a recordset by Column1 or Column2 etc.
the DataReport shows me another order of ranking.
How can I solve this ??
You could also try re-defining the .Source or .Sort property for the data
environment command which the report is bound to right before opening the
Set myCommand = DataEnvironment1.Command1
'Ensure the command state is 0 (Closed)
If .State = 1 then
'Set the source
.Source = "Select Field1, Field2 from Table Order by Field1;"
'Re-Open the command
'Open New Report
Dim myReport as New DataReport
Set myReport = New DataReport
Note: The report should order based on your original source design unless
you change the order at run-time.
> When I arrange a recordset by Column1 or Column2 etc.
> the DataReport shows me another order of ranking.
> How can I solve this ??
I use a datareport 'dr' to show the contents of a table.
I therefore use a dataenvironment 'de' as datasource.It has one command
I have a listbox 'lstyear' in which i can choose a year
Private Sub lstyear_Click()
de.Commands("table").CommandText = "JR" & lstyear.list(lstyear.listindex)
So i start the program, chooses an year and the datreport shows the results
of the year x.
So i close the datreport and i select an other year ,however the
datareport keeps showing the results of the year x.
Why does it works the first time and not the second time i select a year in