Each of these queries calculates Cycle as 1+Int((Year([Event_Date])-2006)/4). Since Covid wrecked 2020, the result returned by that calculation is off by one for each year after 2019 and will be off in perpetuity unless the queries are fixed.
possible solution:
-- building block
-- this is how you join table `PanelSeason` to `tbl_Events`
-- this code chunk is re-used in each of the queries above (basically, in each instance of `tbl_Events as E`)
SELECT
*
FROM
((
SELECT
Event_ID,
Str(Year([Event_Date])) AS str_year
FROM
tbl_Events
) AS tbl_E
INNER JOIN (
SELECT
Cycle,
Str(PanelSeason.FieldSeason) as str_season
FROM
PanelSeason
) AS tbl_P
ON
tbl_P.str_season = tbl_E.str_year)
;
Problems present in:
qExport_All_Events
qExport_All_CWD
qExport_All_Herbaceous
qExport_All_Plot_Floor_Conditions
qExport_All_Quadrat_Conditions
qExport_All_Sapling_Foliage_Conditions
qExport_All_Sapling_Stems
qExport_All_Saplings
qExport_All_Seedlings
qExport_All_Shrub_Seedlings
qExport_All_Shrubs
qExport_All_Stems
qExport_Conditions
qActive_Sapling_Conditions
qActive_Tree_Conditions
qExport_AllVines
qExport_All_Sapling_Vines
qExport_All_Tree_Vines
qSum_Tree_and_Sapling_Cycles
qActive_Sapling_Data
Each of these queries calculates
Cycle
as1+Int((Year([Event_Date])-2006)/4)
. Since Covid wrecked 2020, the result returned by that calculation is off by one for each year after 2019 and will be off in perpetuity unless the queries are fixed.possible solution: