H
Hugh self taught
Hi Everyone,
I have a basic form for data entry /update of Competitors. I now want to set
the default value of a cbo box "Age Group" when I have updated the value in
the Date of Birth field. I already have the following query for another
purpose elsewhere that I should be able to use but I can't get the correct
syntax in my head. Can you assist pse...
SELECT Competitors.Competitor_Idx, Competitors.First_Name & " " &
Competitors.Surname AS Name, Competitors.Date_of_Birth, [Age Group].[Age
Group], [Age Group].MaxAge, [Age Group].MinAge,
DateDiff("yyyy",[Date_of_Birth],Now())+Int(Format(Now(),"mmdd")<Format([Date_of_Birth],"mmdd")) AS CurrAge
FROM Competitors, [Age Group]
WHERE
(((DateDiff("yyyy",[Date_of_Birth],Now())+Int(Format(Now(),"mmdd")<Format([Date_of_Birth],"mmdd"))) Between [MinAge] And [MaxAge]));
I have a basic form for data entry /update of Competitors. I now want to set
the default value of a cbo box "Age Group" when I have updated the value in
the Date of Birth field. I already have the following query for another
purpose elsewhere that I should be able to use but I can't get the correct
syntax in my head. Can you assist pse...
SELECT Competitors.Competitor_Idx, Competitors.First_Name & " " &
Competitors.Surname AS Name, Competitors.Date_of_Birth, [Age Group].[Age
Group], [Age Group].MaxAge, [Age Group].MinAge,
DateDiff("yyyy",[Date_of_Birth],Now())+Int(Format(Now(),"mmdd")<Format([Date_of_Birth],"mmdd")) AS CurrAge
FROM Competitors, [Age Group]
WHERE
(((DateDiff("yyyy",[Date_of_Birth],Now())+Int(Format(Now(),"mmdd")<Format([Date_of_Birth],"mmdd"))) Between [MinAge] And [MaxAge]));