Recordset not updating ? (1 Viewer)

liamfitz

Registered User.
Local time
Today, 14:13
Joined
May 17, 2012
Messages
240
The following code is now not working ( whereas it was before ) It throws up no errors, and seems to run without a hitch.
Code:
If Not (rst1.BOF And rst1.EOF) Then
                With rst1
                    .MoveLast
                    .MoveFirst
                    If .RecordCount = 1 Then
                        .Edit
                        .Fields("Staff_ID") = staffid
                        .Fields("CalcStaff_Name") = Me.cboAssigned_To.Text
                        .Update
                    End If
                End With
            End If
        End If
    End If      '
    DoCmd.RunCommand acCmdSaveRecord
the values for the fields to update with, are as they should be ( checking with breakpoint ), and it selects the correct single record ( Dynaset so therefore should be updateable ). Thanks in advance if you can assist.:confused:
 

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 09:13
Joined
Jul 5, 2007
Messages
586
I assume there is some missing code, otherwise there are two too many End If lines but that should generate an error of its own.

Can you fire a msgbox to show your record count in rst1 right after .movefirst?

Is it possible the values to update are already the same as the values you are writing?
 

Users who are viewing this thread

Top Bottom