Table Update Problem

J

Joel

I have a form that is populated by a query and all but three boxes are
bound to that query.
The first unbound box (LTxtLvChk) is a manual input from the user. The
second unbound box (LVAppWho) contains the user's name from previous
form and the third (LvAppDate) contains the current date.
The idea being that each record is to be reviewed and
approved/disapproved by the user
who opened the form and then update the table. I tried the following
update statement
and the results were mixed. While it would post the approval box to
every record, it
would only post the approver and current date to the first record.
Anyone got any ideas?


DoCmd.RunSQL "Update Leavesheet" _
& " SET LeaveSheet.LvAppWho = '" &
Forms!frmLvHrApproval!TxtLvAppr & "'," _
& " LeaveSheet.LvAppDate = #" & Forms!frmLvHrApproval!TxtCurDte
& "#," _
& " LeaveSheet.LvApp = " & Forms!frmLvHrApproval!TxtLvChk _
& " WHERE LeaveSheet.UserName = '" &
Forms!frmLvHrApproval!LvUserName & "'" _
& " AND LeaveSheet.TDate = #" & Forms!frmLvHrApproval!TxtTDate
& "#;"
 
Top