Lookup data from another form?

Lookup data from another form?

 Hello! Hopefully one of you is able to help me with this. (It is probably easy for most of you)
I have created a form that includes these columns:
DISCOUNT CODE
DISCOUNT DOLLAR VALUE
DISCOUNT PERCENTAGE
EXPIRY DATE

In my Web Form I have Discount field where a user can enter a Discount Code. How can I get my application to check the Discount Codes form to: a) see if the code exists b) Check if expired  c)Display the discount d) reduce discount from Total Price field.  Thank you for your assistance with this. Any help is greatly appreciated!