K
Kevin Baker
Hi Everyone,
I'm using the following code to update a field in on my form, however, I get
the error code 3301 from the Set RS statement. Anyone see my problem?
Private Sub Date_AfterUpdate()
Set rs = CurrentDb.OpenRecordset("PONUMBER", dbopendynaset)
rs.MoveFirst
myval = rs("LastNo")
If myval = 9899 Then
myval = 9700
Else
myval = myval + 1
End If
PONumber = myval
rs.edit
rs("lastno") = myval
rs.Update
Set rs = Nothing
End Sub
Thanks,
Kevin
I'm using the following code to update a field in on my form, however, I get
the error code 3301 from the Set RS statement. Anyone see my problem?
Private Sub Date_AfterUpdate()
Set rs = CurrentDb.OpenRecordset("PONUMBER", dbopendynaset)
rs.MoveFirst
myval = rs("LastNo")
If myval = 9899 Then
myval = 9700
Else
myval = myval + 1
End If
PONumber = myval
rs.edit
rs("lastno") = myval
rs.Update
Set rs = Nothing
End Sub
Thanks,
Kevin