Thanks in advance for any help, you'll be a real lifesaver.
Anyway, when I try to update a unbound table based on a bound field in the current record, I get a "
"You can't go to the specified record"" error and the field is not updated. The bound table stores the correct data, but the unbound field fails to update. Anyone have an idea what's wrong?
Thanks...
On Error GoTo form_err
Dim db As Database, rs As DAO.Recordset
Dim meetingdate As Date
Dim x As String
txtID.SetFocus
x = txtID.Text
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM Contacts WHERE contactID LIKE '" & _
x & "'", dbOpenDynaset)
meetingdate = Me!CallDate
With rs
.MoveFirst
.Edit
.Fields("LastMeetingDate" = meetingdate
.Update
End With
rs.Close
'db.Close
Form_after_update_Exit:
Exit Sub
form_err:
MsgBox Err.Description
Resume Form_after_update_Exit
ContactID.SetFocus
End Sub
Originally, I was getting a "No current record" message, but then after further work, this is what I'm getting.
Thanks!
Anyway, when I try to update a unbound table based on a bound field in the current record, I get a "
"You can't go to the specified record"" error and the field is not updated. The bound table stores the correct data, but the unbound field fails to update. Anyone have an idea what's wrong?
Thanks...
On Error GoTo form_err
Dim db As Database, rs As DAO.Recordset
Dim meetingdate As Date
Dim x As String
txtID.SetFocus
x = txtID.Text
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM Contacts WHERE contactID LIKE '" & _
x & "'", dbOpenDynaset)
meetingdate = Me!CallDate
With rs
.MoveFirst
.Edit
.Fields("LastMeetingDate" = meetingdate
.Update
End With
rs.Close
'db.Close
Form_after_update_Exit:
Exit Sub
form_err:
MsgBox Err.Description
Resume Form_after_update_Exit
ContactID.SetFocus
End Sub
Originally, I was getting a "No current record" message, but then after further work, this is what I'm getting.
Thanks!