Try changing
If rsDetails(1) = lblTransactionID.Caption Then

to
If rsDetails.Fields(1).Value = lblTransactionID.Caption Then