Hi!
I am having a problem with finding a way to identify whethera value stored in a “ModDate” column is a start date or an end date. This Date field is stored in the [“MOD”]table, which is connected to [“POSITION”] via a many-to-many relationship with [“POSITION_MOD”]in the middle. Within the [“MOD”] table,I just have the ID, a Mod_Number, and the ModDate. Within the [“POSITION_MOD”] Table I have boththe POSITION_ID and MOD_ID as Primary Keys and Foreign keys, along with aModAction (Added/ Removed). TheModAction identifies whether the Mod will be adding or removing the specific position. The ModAction field should be used to identifywhether the ModDate field should be the Added_Date or the Removed_Date for the correspondingMod.
Ideally, the Added_Dateand Removed_Date columns will be populated from the ModDate column, and will beidentified as the Added/Removed date from the Action. For example, if a ModDate is 1/1/2019 and theModAction value is “Added”, then the Added_Date within the POSITION_MODtable will be the “1/1/2019” value fromthe ModDate. I would like the value (ifpossible) to be calculated within a query, so then I can easily set controlscorresponding to the Added_Date and the Removed_Date on my main form.
- I am thinking that a SQL query to decide whichtable to put the data into could be best.. (maybe a CASE or a query criteria)but I am not sure how to go about doing so.
I know this may sound a little crazy, but [I think] it isthe best normalized structure for storing the Date and Action for a Mod, sincea Mod always has one date, but a single Mod can be both add and remove various different positions. Anyfeedback is greatly appreciated, as I have had no luck for quite some time.
Thank you for all responses!![]()