fat controller
Slightly round the bend..
- Local time
- Today, 07:18
- Joined
- Apr 14, 2011
- Messages
- 758
I am trying to have a Before Update event update a field in a table, but I must confess I have never used VBA/SQL to update a table in this way. I have tried the follwing (trying to guess my way along), but I get an undeclared variable error which highlights the table name:
Can anyone direct me as to where I am going wrong please?
Code:
Dim sUserName As String
Dim RRID
RRID = Me.txtTrackerID.Value
sUserName = Environ$("username")
Update RouteRecordsRevTracker
Set LastWorkedOnBy = sUserName
WHERE RRTrackerID = RRID
Can anyone direct me as to where I am going wrong please?