LeizladNeb
Technical User
I have developed 3 expressions within queries to allow me to predict dates which jobs can be done by. the system works on a 5 jobs per day basis. It takes the current date, adds on one day, and then adds on another day for every 5 pending jobs. It looks like this:
PendingJobs: [tblJob]![JobStatusID]
This returns records with JobStatusID = 1
DaysToAdd: Round(((Sum([QryPendingJobs]![Pendingjobs])/5)+0.49999),0)
This sums the retuned recods and divides it by 5, finding how many days should be added. it rounds up to the nearest integer.
DateToAddTo: Date()+(1+[DaysToAdd])
This takes the current date, adds one and the value obtained above.
My problem lies in that i want this value to automatically present itself as the value of a field within a table, on a form.
The 'DueDate' field within the 'tblJob' table needs to be given this value effectivly as if it's just been copied and pasted into the form that serves as the data entry point
i think i might have to take the expression and put it into vba, or use vba to take the value accross. im having trouble refering to tables and queries in vba as im somewhat of a newbie.
If anyones understood that poorly explained problem, please let me know what i could do with doin.
thanks in advance
ben dalziel
PendingJobs: [tblJob]![JobStatusID]
This returns records with JobStatusID = 1
DaysToAdd: Round(((Sum([QryPendingJobs]![Pendingjobs])/5)+0.49999),0)
This sums the retuned recods and divides it by 5, finding how many days should be added. it rounds up to the nearest integer.
DateToAddTo: Date()+(1+[DaysToAdd])
This takes the current date, adds one and the value obtained above.
My problem lies in that i want this value to automatically present itself as the value of a field within a table, on a form.
The 'DueDate' field within the 'tblJob' table needs to be given this value effectivly as if it's just been copied and pasted into the form that serves as the data entry point
i think i might have to take the expression and put it into vba, or use vba to take the value accross. im having trouble refering to tables and queries in vba as im somewhat of a newbie.
If anyones understood that poorly explained problem, please let me know what i could do with doin.
thanks in advance
ben dalziel