N
nathan sanders
Hi,
When I try and run this code i get an error message on the .requery telling
me that: Error '3251' Operation not supported for this type of object'
What's happening please?
Public Function ChangeField(rstTable As Recordset, intID As Date,
strFieldName As String, varValue As Variant) As Integer
With rstTable
.Requery
.FindFirst "ID = " & intID
If .NoMatch = True Then
ChangeField = -1
Else
.Edit
.Fields(strFieldName).Value = varValue
.Update
ChangeField = intID
End If
End With
End Function
Thanks
Nathan
When I try and run this code i get an error message on the .requery telling
me that: Error '3251' Operation not supported for this type of object'
What's happening please?
Public Function ChangeField(rstTable As Recordset, intID As Date,
strFieldName As String, varValue As Variant) As Integer
With rstTable
.Requery
.FindFirst "ID = " & intID
If .NoMatch = True Then
ChangeField = -1
Else
.Edit
.Fields(strFieldName).Value = varValue
.Update
ChangeField = intID
End If
End With
End Function
Thanks
Nathan