Hi, I'm interpreting an Excel spreadsheet into an Access database, and I have one particular problem.
In one column in excel, the formula used, uses nested if statements and the weekday() function and I'm not sure how to conver the Excel syntax to Access.
I always want the default value of this field to be:
Code:
=IF(WEEKDAY(Sheet1!$A7) = 7, $B$2, IF(WEEKDAY(Sheet1!$A7) = 1, $B$3, $B$1))
Or, in slightly more database relatable terms:
Code:
=IF(WEEKDAY([@date_column]) = 7, [!another_table@another_column2], IF(WEEKDAY([@date_column]) = 1,[!another_table@another_column], [!another_table@another_column]))
Hard to explain, and I'm sure less than ideal syntax.
So the table has two columns, "date_column" and "weekday_column". So the default value of "weekday_column" checks "date_column" for the day, and then returns the appropriate value from "another_table". If it's Saturday, you get one value, if Sunday another, any other day of the week you get the standard.
Thank you very much for any help, and hit me up with any questions, I know it's terribly explained.