EmanuelSpence
IS-IT--Management
I am in a current form
The Table is called 'Short Time Working'
The current record is 'ShortTimeID'
and I want to update the value of field 'Week Number' to 67 when i press the command button
What am i doing wrong ?
Dim Tn As DAO.Recordset
Set Tn = CurrentDb.OpenRecordset("SELECT * FROM [Short Time Working] WHERE ShortTimeID =" & Me.ShortTimeID)
If Not Tn.EOF Then
Tn.Edit
Tn.Fields("Week Number").Value = 67
Tn.Update
End If
Tn.Close
Set Tn = Nothing
The Table is called 'Short Time Working'
The current record is 'ShortTimeID'
and I want to update the value of field 'Week Number' to 67 when i press the command button
What am i doing wrong ?
Dim Tn As DAO.Recordset
Set Tn = CurrentDb.OpenRecordset("SELECT * FROM [Short Time Working] WHERE ShortTimeID =" & Me.ShortTimeID)
If Not Tn.EOF Then
Tn.Edit
Tn.Fields("Week Number").Value = 67
Tn.Update
End If
Tn.Close
Set Tn = Nothing