If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Working days
I have a field that updates upon the checking of a tick box. A further field
is linked to the updated one which is basically 3 days after the updated box. Is it possible to make this update 3 working days after, rather than a simple Date()+3. Many Thanks, Matt |
#2
|
|||
|
|||
Working days
"Matt Dawson" wrote in message
I have a field that updates upon the checking of a tick box. A further field is linked to the updated one which is basically 3 days after the updated box. Is it possible to make this update 3 working days after, rather than a simple Date()+3. The functions posted here should be able to help you: http://www.mvps.org/access/datetime/date0012.htm Date/Time: Doing WorkDay Math in VBA -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#3
|
|||
|
|||
Working days
Ok, at present I cant seem to be able to make this work.
Should the code read: Private Sub Quote_Sent_AfterUpdate() If Me![Quote Sent] = -1 Then Me![Contract Quote Date] = Date Me![Chase Up Date] = dhAddWorkDaysA(3, [Contract Quote Date]) The chase up date is based on the figure in contract quote date but should be 3 working days after. Contract quote date is based on whenever the Quote Sent box was checked. Thanks, Matt "Dirk Goldgar" wrote: "Matt Dawson" wrote in message I have a field that updates upon the checking of a tick box. A further field is linked to the updated one which is basically 3 days after the updated box. Is it possible to make this update 3 working days after, rather than a simple Date()+3. The functions posted here should be able to help you: http://www.mvps.org/access/datetime/date0012.htm Date/Time: Doing WorkDay Math in VBA -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#4
|
|||
|
|||
Working days
"Matt Dawson" wrote in message
Ok, at present I cant seem to be able to make this work. Should the code read: Private Sub Quote_Sent_AfterUpdate() If Me![Quote Sent] = -1 Then Me![Contract Quote Date] = Date Me![Chase Up Date] = dhAddWorkDaysA(3, [Contract Quote Date]) The chase up date is based on the figure in contract quote date but should be 3 working days after. Contract quote date is based on whenever the Quote Sent box was checked. That looks like it should work. What's actually happening when you update [Quote Sent]? In what way is it not working? Are you getting an error message? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#5
|
|||
|
|||
Working days
I get an error message saying 'Sub or function not defined'. The line Private
Sub Quote_Sent_AfterUpdate() is highlighted yellow, with dhAddWorkDaysA highlited as if selected. Matt "Dirk Goldgar" wrote: "Matt Dawson" wrote in message Ok, at present I cant seem to be able to make this work. Should the code read: Private Sub Quote_Sent_AfterUpdate() If Me![Quote Sent] = -1 Then Me![Contract Quote Date] = Date Me![Chase Up Date] = dhAddWorkDaysA(3, [Contract Quote Date]) The chase up date is based on the figure in contract quote date but should be 3 working days after. Contract quote date is based on whenever the Quote Sent box was checked. That looks like it should work. What's actually happening when you update [Quote Sent]? In what way is it not working? Are you getting an error message? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#6
|
|||
|
|||
Working days
"Matt Dawson" wrote in message
I get an error message saying 'Sub or function not defined'. The line Private Sub Quote_Sent_AfterUpdate() is highlighted yellow, with dhAddWorkDaysA highlited as if selected. Did you copy all the code from that page, everything between "*** Code Start ***" and "*** Code End ***", and paste it into a new standard module? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#7
|
|||
|
|||
Working days
Dirk,
You are a hero, it all works now, was my own stupid fault! Many Thanks, Matt "Dirk Goldgar" wrote: "Matt Dawson" wrote in message I get an error message saying 'Sub or function not defined'. The line Private Sub Quote_Sent_AfterUpdate() is highlighted yellow, with dhAddWorkDaysA highlited as if selected. Did you copy all the code from that page, everything between "*** Code Start ***" and "*** Code End ***", and paste it into a new standard module? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|