Autofill a Field on a form based on values stored in a table.

Autofill a Field on a form based on values stored in a table.

I use Form A to inser data in Table A. Then I have a Form B with two number fields (Field 1 and Field 2). I expect the user to fill the first field on this form (Field 1) and after that I need the form to autofill the second field (Field 2) with the closest coefficient where the Value A <= Field 1. Here the ilustration:



Example:
  1. if the user types "1.9" on Field 1, I need Field 2 to be automatically filled with value "14"
  2. if the user types "2" on Field 1, I need Field 2 to be automatically filled with value "14"
  3. if the user types "2.1" on Field 1, I need Field 2 to be automatically filled with value "27"

Any ideas? Thank you!