
Sorting a Database From VB
Hi Larry,
Wouldn't something like:
Me.Data1.DatabaseName = "d:\MyDocs\Access\db1.mdb"
Me.Data1.RecordSource = _
"SELECT f1, f2, f3, f4 FROM Table1 ORDER BY f2, f4"
do the job for you?
Krgrds,
Perry
Quote:
> I have a database called db1 with a table call records.
> I have set it up as data1 recordset.
> Is there a code that will allow a sort of the table
> (records). The table has mulitple fields. I want to sort
> first by field1 and then by field4.
> When the sort takes place will the table be permanetly
> sorted so that i can print one line at a time, grabbing
> each line of the table and printing it, in sorted format.
> thanks
> larry