A
Al
This is my basic process data routine:
Public Sub ProcessData()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim dblComValue as Double
Set rst = dbs.OpenRecordset("tblData", dbOpenDynaset)
With rst
.MoveFirst
Do While Not .EOF
If ![idsTypeID] = 1 then
dblComValue = ![dblCom04]
else
dblComValue = ![dblCom05]
endif
.MoveNext
Loop
End With
Set rst = Nothing
End Sub
How do I modify ProcessData() to open tblData with a filter so I only get
the subset of rows where intOrderType = 2?
Public Sub ProcessData()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim dblComValue as Double
Set rst = dbs.OpenRecordset("tblData", dbOpenDynaset)
With rst
.MoveFirst
Do While Not .EOF
If ![idsTypeID] = 1 then
dblComValue = ![dblCom04]
else
dblComValue = ![dblCom05]
endif
.MoveNext
Loop
End With
Set rst = Nothing
End Sub
How do I modify ProcessData() to open tblData with a filter so I only get
the subset of rows where intOrderType = 2?