There are many ways. The exact one depends on the finer points of your requirements. Since we don't know those, here is a simple one:
Create the query for formB. In the criteria for some field write:
Forms!formA!someControlOnFormA
-Tom. Microsoft Access MVP