Hello,
I'm tryin to add the value "2007" to a field (YearUpdated) in a table (tblgdmreport) for all records. (I created a button to carry out the event)
I have the following but I know I'm missing something/not doing it correctly.
Any help would be greatly appreciated!
I'm tryin to add the value "2007" to a field (YearUpdated) in a table (tblgdmreport) for all records. (I created a button to carry out the event)
I have the following but I know I'm missing something/not doing it correctly.
Code:
Private Sub Command9_Click()
Dim dbmydb As Database
Set dbmydb = OpenDatabase("P:\Databases\Access Database Development\1. Current Database\NEW\databaseNEW")
Dim rsmyrs As Recordset
Set rsmyrs = dbmydb.OpenRecordset("tblgdmreport", dbOpenDynaset)
If Not rsmyrs.EOF Then rsmyrs.MoveFirst
Do While Not rsmyrs.EOF
rsmyrs.Edit
rsmyrs.Fields("yearupdated").Value = "2007"
rsmyrs.MoveNext
Loop
End Sub
Any help would be greatly appreciated!