Here is instructions from Jon Watson at Biomationsystems.com that will work for what you are wanting to do. Change as needed, give Jon credit.
MS Access Tip – How to use variables in the Access query design form.
In this example you are going to learn how to enter or select data in one form...