dantheinfoman
Programmer
Hi All,
I thought this would be a no-brainer, but it isn't working no matter how I try it. I want to set APPROVBILL to .T., to put the date and time and whoever ran the macro to approve all the items in the current date range for that employee.
When I click the button and run this code:
. . . it merely marks all those records in date range for that job that APPROVBILL = .T., however it doesn't put the date, time or the userID in the other 3 fields for those records.
I'm sure it's a syntax thing. I tried putting the scope of ALL in it like this:
. . . but that didn't help either.
Can anybody tell me if there's a way to do this. Else, I will just run a SCAN FOR in order to make this work.
Thanks
Dan
I thought this would be a no-brainer, but it isn't working no matter how I try it. I want to set APPROVBILL to .T., to put the date and time and whoever ran the macro to approve all the items in the current date range for that employee.
When I click the button and run this code:
Code:
REPLACE tk_JOB.APPROVBILL WITH .t.,;
tk_job.approvdat WITH DATE(),;
tk_job.approvtim WITH LEFT(TIME(),2)+SUBSTR(TIME(),4,2),;
tk_job.approvby WITH m.gcUserID;
for tk_JOB.job = ThisForm.Pageframe1.Page3.CBOJob.Value AND ;
BETWEEN(tk_JOB.WORK_DATE,m.Begins,m.Ends) IN tk_JOB
. . . it merely marks all those records in date range for that job that APPROVBILL = .T., however it doesn't put the date, time or the userID in the other 3 fields for those records.
I'm sure it's a syntax thing. I tried putting the scope of ALL in it like this:
Code:
REPLACE tk_JOB.APPROVBILL WITH .t.,;
tk_job.approvdat WITH DATE(),;
tk_job.approvtim WITH LEFT(TIME(),2)+SUBSTR(TIME(),4,2),;
tk_job.approvby WITH m.gcUserID;
[b]ALL[/b] ;
for tk_JOB.job = ThisForm.Pageframe1.Page3.CBOJob.Value AND ;
BETWEEN(tk_JOB.WORK_DATE,m.Begins,m.Ends) IN tk_JOB
. . . but that didn't help either.
Can anybody tell me if there's a way to do this. Else, I will just run a SCAN FOR in order to make this work.
Thanks
Dan