Create Records

James Tebb

New Member
Joined
Nov 12, 2009
Messages
26
I have a table that logs events. The fields in this table include:-
Event Name
Start Date
End Date

I have a second table that logs the schedule for each day of the event. This has the following fields:-
Event Name
Date
Event Detail

The tables are linked via the event name (this all works fine).

When I enter a new event in table one I want the second table to create records for each day of the event starting from the day before the start date and ending on the end date.

Any ideas??
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
One way that I can think of achieving this is to put Table1 into a form (you can make it a datasheet form to make it look like a normal table). From here you can create a an 'AfterUpdate' code that will look up if the relevant target 'Event' in Table1 doesn't exist in Table2 then Append new date records in Table2.

I think the only way to achieve what you want is via vba code and I don't think there is a way of triggering a vba code after updating a table directly, hence the suggestion of creating a form to trigger the vba code....hopefully that makes sense.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top