Try using the DLookup function.
varName = DLookup("Field1", "QueryName", "Criteria"
If anything includes embedded spaces, enclose it within square brackets (eg "[Last Name]"

.
If successful, DLookup will return the value of Field1 into varName. Field1 would need to be a field in your query.
QueryName is just the name of the query you want to search.
Criteria is like an SQL WHERE clause without the WHERE. As an example, assume you are looking for a query field called last name = "Smith" and that "Smith" is the value from a form text box called txtLastName. The criteria part would look like this: "[Last Name] = '" & txtLastName & "'". Note the single quotes around the textbox value. If you are using numeric data, remove them. If you are using date data, replace them with #.
So using our above example, here is how it would look:
varName = DLookup("Field1", "QueryName", "[Last Name] = '"
& txtLastName & "'"
You can save yourself some headaches by not naming fields and form controls with embedded spaces.
Good Luck!