SpandexBobcat
Technical User
Hi there,
I need to update a table when a report closes. The field 'paid' must change from 'No' to 'Yes' in my table OVERTIME. I was given this code to go in 'on close' but it doesnt seem to work, it asks for a parameter value for the report and everytime says it is about to update (0) fields. Here is the code:
UpdateTxt = "UPDATE OVERTIME SET OVERTIME.paid = -1 WHERE OVERTIME.Name = " & Me.Name
DoCmd.RunSQL UpdateTxt
Can anyone tell me what is going on? Name is not the primary key.....
Thanks in advance.
Simon.
I need to update a table when a report closes. The field 'paid' must change from 'No' to 'Yes' in my table OVERTIME. I was given this code to go in 'on close' but it doesnt seem to work, it asks for a parameter value for the report and everytime says it is about to update (0) fields. Here is the code:
UpdateTxt = "UPDATE OVERTIME SET OVERTIME.paid = -1 WHERE OVERTIME.Name = " & Me.Name
DoCmd.RunSQL UpdateTxt
Can anyone tell me what is going on? Name is not the primary key.....
Thanks in advance.
Simon.