Query last entry

Query last entry

Hi, I have a sales form for a loyalty program with the following fields:
  1. Sales Date
  2. Membership Number
  3. Customer Name
  4. Last Sales Date
Is there a way to query existing sales, when inputting the Membership Number, to populate the Last Sales Date field with the last unique entry date for that specific member?