A
Al Camp
I want to apply a Date Range parameter to a query in DAO. frmDialog (Open)
calls this procedure, and has two dates on it that I want to use as parameters for
the query (BeginningDate and EndingDate)
Right now, I'm just trying to open the query, apply the parameters, and begin
operating upon that dataset.
Dim dbs As Database
Dim rst As Recordset
Dim qdf As QueryDef
Set dbs = CurrentDb()
Set qdf = dbs.QueryDefs("qryTestSnapReportOutage")
' query contains IncDate field...
' Parameters?? IncDate between Forms!frmDialog!BeginningDate
' and Forms!frmDialog!EndingDate
Set rst = qdf.OpenRecordset("qryTestSnapReportOutage")
rst.MoveLast
rst.MoveFirst
Just can't seem to get that parameter statement right.
Searched Google groups, but can't find this specific "using the form date range"
example.
Thanks in advance,
Al Camp
calls this procedure, and has two dates on it that I want to use as parameters for
the query (BeginningDate and EndingDate)
Right now, I'm just trying to open the query, apply the parameters, and begin
operating upon that dataset.
Dim dbs As Database
Dim rst As Recordset
Dim qdf As QueryDef
Set dbs = CurrentDb()
Set qdf = dbs.QueryDefs("qryTestSnapReportOutage")
' query contains IncDate field...
' Parameters?? IncDate between Forms!frmDialog!BeginningDate
' and Forms!frmDialog!EndingDate
Set rst = qdf.OpenRecordset("qryTestSnapReportOutage")
rst.MoveLast
rst.MoveFirst
Just can't seem to get that parameter statement right.
Searched Google groups, but can't find this specific "using the form date range"
example.
Thanks in advance,
Al Camp