Let me just first preface this by saying I am relatively new to access. Used it many years ago (version 2000) but have recently picked it back up again (now version 2010) so my database skills are a little rusty. Here's the situation I am trying to rectify and would love to get some perspective on it. I have a table of employee hours by date ("Employee Hours"). I also have another table which includes the start and end dates of each payroll period ("Payroll Calendar"). I would like to assign the employee hours to the corresponding payroll period in the "Employee Hours" table. If I were using excel I would have created a forumula that looks something like this...
=IF(AND(Date1>=PayrollBeginDate1,Date1<=PayrollEnd Date1),Pay Period 1,IF(AND(Date1>=PayrollBeginDate2,Date1<=PayrollEn dDate2),Pay Period 2,if(AND(Date1>=PayrollBeginDate3,Date1<=PayrollEn dDate3),Pay Period 3,IF...etc,etc.
Is there a way to do a similar function in access? I tried using the lookup but obvsiously having to key in 50,000+ entries is not really realistic.
Thanks!