the other recordsets on the page have where clauses to filter the month day year and ampm column on querystring variables.
you need to add the where clause to the RsAM recordset as well.
open the RsTripDetails
Note the settings for the colname, colnameday, colnameam and colnameyear paramters so you can recreate them. copy the where clause.
then open the RsAM, past the where clause before the group by clause, and recreate the parameters.