vba code.
Build the sql and concatenate the form field number in to it.
Run/execute the sql or whatever it is you need to do with it.
If you have a form, why do you need an input box also? I started to post a bit of an example, but can't tell for sure if there is an input box or not because that is an actual type of input all on its own.
based on a number that a user inputs into a form
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.