D
DGregg
I need to calculate day of week based on a report date on a form and have the
data stored in the table. First off, I realize that this may be frowned upon
in that a query could be set up to calculate the day of week on an as needed
basis. This however, is not an option in that it doesn't meet the need for
how the database is to be used. I need to have both the form and table
display/store the day of week (i.e. Sunday).
I created a form in which the report date is entered. So also created a
combo box to capture the day of week in which there are 2 columns; column 1
is the translation (i.e. Sunday) and column 2 is the corresponding number for
day of week (i.e. 1) (Sunday = 1). If I enter weekday([ReportDate]) in the
control source for the combo box the value is returned on the form but is not
stored in the table. The combo box allows the english translation for the
numeric day of week value to be displayed on the form (displays as Sunday
rather than 1). I tried entering the formula (weekday([ReportDate]) in
AfterUpdate for the report date field but the day of week field is not being
updated. What am I doing wrong? Thank you in advance!
data stored in the table. First off, I realize that this may be frowned upon
in that a query could be set up to calculate the day of week on an as needed
basis. This however, is not an option in that it doesn't meet the need for
how the database is to be used. I need to have both the form and table
display/store the day of week (i.e. Sunday).
I created a form in which the report date is entered. So also created a
combo box to capture the day of week in which there are 2 columns; column 1
is the translation (i.e. Sunday) and column 2 is the corresponding number for
day of week (i.e. 1) (Sunday = 1). If I enter weekday([ReportDate]) in the
control source for the combo box the value is returned on the form but is not
stored in the table. The combo box allows the english translation for the
numeric day of week value to be displayed on the form (displays as Sunday
rather than 1). I tried entering the formula (weekday([ReportDate]) in
AfterUpdate for the report date field but the day of week field is not being
updated. What am I doing wrong? Thank you in advance!