Hello all!!
I am new in access and vba coding so I need some help to evaluate the following issue:
I currently have a SECONDARY table with the following fields.
1. ID
2. ContactID
3. Date
4. Status
5. Area
6. Team
The MAIN table contains the following:
1. ID
2. ContactID
3. Contact Name
4. DOF
5. Phone number
6. Address
Etc etc
For each Contact I have in the MAIN table there are multiple records (one for every day) for that Contact in the SECONDARY table. New records have to be created every day to match the current condition for each of the 250 contacts in the main table. Many contacts have a static condition for a long period of time.
The issue is that I would like to create a button, when clicked, a vba code must run that will copy for each CUSTOMER the last date status for the following date utill today is reached:
I hope you understand my thought. I don't know if I have thought correctly about the logic of this piece of code.
Any help would be really appreciated.
Thanks in advance
Christos
I am new in access and vba coding so I need some help to evaluate the following issue:
I currently have a SECONDARY table with the following fields.
1. ID
2. ContactID
3. Date
4. Status
5. Area
6. Team
The MAIN table contains the following:
1. ID
2. ContactID
3. Contact Name
4. DOF
5. Phone number
6. Address
Etc etc
For each Contact I have in the MAIN table there are multiple records (one for every day) for that Contact in the SECONDARY table. New records have to be created every day to match the current condition for each of the 250 contacts in the main table. Many contacts have a static condition for a long period of time.
The issue is that I would like to create a button, when clicked, a vba code must run that will copy for each CUSTOMER the last date status for the following date utill today is reached:
Code:
A. Loop 1
i. Loop 2
1. Apply Filter for [ContactID]
2. Select the LATEST Record
3. Then copy * into a new Record
4. Change the date field to equal [Date]=[Date]+1day
5. If the date field [Date]=today's date STOP.
End Loop 2
End Loop 1
I hope you understand my thought. I don't know if I have thought correctly about the logic of this piece of code.
Any help would be really appreciated.
Thanks in advance
Christos