Rather Complex Problem

Henley12

Troy University Fan
Local time
Today, 08:41
Joined
Oct 10, 2007
Messages
222
I have a rather complex problem, and I hope I can describe it accurately. I have a form called 'Scheduled Work Orders' which is used to generate new work orders based on a date range. I have a from and to date field which I can populate to bring up a list of scheduled jobs between those two dates via a subform. When I press the 'Generate' button, it creates new work orders based on those job schedules. This works just fine. My problem is there is a field in the schedule table that I need to be updated with the next scheduled date. For example, if a job is scheduled Monthly beginning on February 14th, when this 'Generate' button is pressed on the scheduled work orders form, I need for the schedule table to be updated to the 'Next Generated Date', i.e. March 14th. I need for this to happen to all jobs in the list that pulls up on the 'Scheduled Work Orders' form when the 'Generate' button is pressed. I hope that makes sense. Please advise!
 
Look at the dateAdd function. You could use this to add a month to the start date.
 
The date calculation isn't the problem. The problem is getting the table updated from a form that does not reference that particular table, and only updating the records that are generated. I have the calculations for all the possible date possibilities working perfectly, but I need for the table to be updated properly. Does that make sense?
 
Build an update query that updates the table, then set your generate button to run the query right after the records have been generated.
 
Thanks, Golf. Using that method with a couple other steps, I was able to accomplish what I needed to. I appreciate the quick responses.
 

Users who are viewing this thread

Back
Top Bottom