E
Eric
I'm trying to update a table based on a query string, but I'm not using the
recordset properly I think:
Public Sub UpdSomeEmployeeRelatedID(aLkupField As String, _
aRelatedID As Variant, anEmpIDCollection As
Collection)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim vItem As Variant
Dim sql As String
Set db = CurrentDb
For Each vItem In anEmpIDCollection
sql = qryUpdEmplyeesBySomeID(aLkupField, aRelatedID, vItem)
Set rs = db.OpenRecordset(sql)
Next vItem
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
TIA,
Eric
recordset properly I think:
Public Sub UpdSomeEmployeeRelatedID(aLkupField As String, _
aRelatedID As Variant, anEmpIDCollection As
Collection)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim vItem As Variant
Dim sql As String
Set db = CurrentDb
For Each vItem In anEmpIDCollection
sql = qryUpdEmplyeesBySomeID(aLkupField, aRelatedID, vItem)
Set rs = db.OpenRecordset(sql)
Next vItem
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
TIA,
Eric