473,841 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto create record based on date and criteria in other record

32 New Member
I have a db where each record is a certain task to be done. Each record includes the date the task should be completed. Some of the tasks are one time only but some are recurring. I have been having to create a new record for every task even the recurring ones, but I'd like to try to automate creation of the recurring tasks.

What I'm trying to do is set it up so that when I'm setting up a task I can select from a drop down box that this task will not recur or that it will recur every week, month, etc. Then on the date (or the day after) the first task was due I need it to create the task again, but the new task's due date would be set based on the first tasks due date and recurrence interval selected when setting up the first task.

For example, if the original task was:
Fax weekly expense report
Due 9/26/07
Repeat: weekly

I'd like for it to, on 9/26 or 9/27, automatically create this record
Fax weekly expense report
Due 10/3/07
Repeat: weekly

I need to have a record for each task so I can't change the due date on the existing task, and I need the new task record to be created regardless of the previous task being completed.
Sep 26 '07 #1
4 4712
Ian Brown
9 New Member
I created a CheckList database that we use at work that produces Checksheets based on tasks as you describe.

You need to have an additional column where the next date the task will be active can be stored. Then use a script to workout when the next active date is and store it in the table.

Then using a report, or form, to display all the tasks have the same active date as the current date.

The command you need (DateAdd) to forecast the next active date is:

ActiveDate = DateAdd("d", 7, StartDate)

The above command will add 7 Days to the StartDate.

Hope this helps

Sep 26 '07 #2
32 New Member
Thanks for your reply.
I see how you're figuring the next date the task will be needed again, but I also need to write another record to the db for the next task, with the new record being the same as the first task record except that the start date should be set to a future date according to the recurrence frequency of the task.
Sep 27 '07 #3
Ian Brown
9 New Member
Thanks for your reply.
I see how you're figuring the next date the task will be needed again, but I also need to write another record to the db for the next task, with the new record being the same as the first task record except that the start date should be set to a future date according to the recurrence frequency of the task.
So you want to add the same record to the same table but with the start date in the future, or add this data into a second table? By storing the future date in the same record and then using a form/report that looks at the future date should cover what I think you are after.

Your table could look like:
Expand|Select|Wrap|Line Numbers
  1. ID  Discription       StartDate   Days  ActDate
  2. 01  Send Fax to ###   1/1/2007    7     1/7/2007
Run the forcast part of the code after the 1/1/2007 it will update to:
Expand|Select|Wrap|Line Numbers
  1. ID  Discription       StartDate   Days  ActDate
  2. 01  Send Fax to ###   1/1/2007    7     8/7/2007
Sep 27 '07 #4
32 New Member
Thanks again for your help.
If I understand correctly, this wouldn't add a separate (new) record for the new task and I that's what I am trying to do. I need a record for each task, both the old and the new.
To answer your question...I do want the new record to go into the same table as the old one.
Sep 27 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: MVA | last post by:
Hi all I have a database where in a table (tbl_Members), there are 2 date fields (DateOfBirth and DateJoined), and also 2 fields which upon entering the data in the form, it automatically works out the Age (in years) and number of DaysJoined (in days). It works fine but it does not automatically update the Age or DaysJoined columns on opening the form. Can anyone make a suggestion as to how I could say, open up the Switchboard frm,...
by: DaveDiego | last post by:
I'm building a report that has a count of cases for employees. I have separate queries that count, OpenCases, NewCases, TotalCases, Etc. I would like to put all those counts into a record for each EmpID then create a report from that table. Is there some online examples on now to update tables from queries?
by: the hotshot | last post by:
hello, this seems to be a hard question so far and noone has been able to help with this. is it possible to have access start an autonumber with a prefix according to the year when the data is entered. for example, if i entered something in 2004, i would like the number to bigin with 2004003, 2004004, 2004005... and same for 2005001, 2005002...? much and great appreciation for suggestions. thank you,
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table) and children form (table). Relationship equals one to many. I'd like to auto number the fields accordingly and traditionaly I assign a unique number based on a table value that I retrieve + 1. i.e. Parent record field value = 1 Children record...
by: neoteny2 | last post by:
I need MS Access to automatically create reports/subreports based on specific criteria. I am building a database in Access 2003 with different locations/sites. I have the "sites" table created containing site info, including an empty field for "date". I also have a report format already created displaying the site info. I need Access to ask the user for a date, calculate three additional dates using the entered date (adding or subtracting...
by: AA Arens | last post by:
Hi, I have a database with 2 main forms. Contacts and companies. I share the base with two others via LAN. On the companies form I have buttons to navigate throught the records (>400). We are mostly handling let say 5 companies. Every time I have to navigate or choose the find record button to get the right company. I am looking fo a feature to have listed in a combo list the last 5 visited records ("recently visited records").
by: Liam.M | last post by:
Hey guys, Forgive me if my question my be alittle silly, but I would very much appreciate and assistance that could be given! My situation is as follows: I have created a Button, and set it's "On Click" Event proceedure to Loop through my Database and find any records that fall within a Certain Date...if a record is found...it then emails me that a record
by: mebrabham | last post by:
Hello, I am trying to create a running subtotal in a query and then graph the running subtotal for each city group. The data looks like this in the table (for illustration): My City My Date Cumulative Sum Daily Sum DC 03-Apr-07 6 6 DC 04-Apr-07 20 14 DC 05-Apr-07 0 0 DC 06-Apr-07 24 4
by: Ronald | last post by:
I hope somebody can help. I can't get into the specifics of my project, but I'll try to create a simple example: tblVehicle * VIN (text box) * Make (text box) * Model (text box) frmRepair
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.