I have a button, that when clicked, should go through every record in a table(tblEmployee), and set [PassChange] to Yes(-1).
I'm not sure how to specify to run through till it reaches the end of the file, but I think the rest should look something like this:
Dim RecIndex As Integer
RecIndex = 1
Do this until EOF(tblEmployee) is reached **don't know syntax for this part
SQL = "UPDATE tblEmployee SET [PassChange] = -1 WHERE [EmpID] = RecIndex **am I referencing RecIndex properly here?
CurrentDb.Execute SQL
RecIndex = RecIndex +1
Start loop again
Can anyone advise on the end of file part? Does the rest look good?
I'm not sure how to specify to run through till it reaches the end of the file, but I think the rest should look something like this:
Dim RecIndex As Integer
RecIndex = 1
Do this until EOF(tblEmployee) is reached **don't know syntax for this part
SQL = "UPDATE tblEmployee SET [PassChange] = -1 WHERE [EmpID] = RecIndex **am I referencing RecIndex properly here?
CurrentDb.Execute SQL
RecIndex = RecIndex +1
Start loop again
Can anyone advise on the end of file part? Does the rest look good?