Robbie,
Check online help on the QueryDef object, and the parameters collection. Some examples exist here on how to do what you want.
An alternative that I often use is a little simpler, and I'll illustrate below. It involves incorporating the SQL straight into the recordset definition (and thus does not a query object to be set up).
code snipped example:
dim DB as database: set DB = currentdb()
dim rsDate as dao.Recordset
dim F as form: set F = Forms!FrmValues
dim sq as String
sq = "SELECT * " & _
"FROM tblYourTable " & _
"WHERE [Date] = CVDate('" & F![Date] & "')"
set rsDate = DB.openrecordset(sq)
etc.
This technique effectively 'hardcodes' the date value from the form into the recordset, making it unnecessary to have to define and then populate the query parameter objects. Whilst simpler, this is not the most optimal way of doing things, but in most cases, its ease and flexibility justifies the approach.
Another tips if I might: Try to avoid using field names or Form Control names like "Date"; since these are part of the Access language itself (reserved words), they can cause confusion and problems.
I probably havnt answered the whole of your post, but hope that this helps meantime,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)