Compare Y/N Field to Separate Table
Posted on 2010-11-11
I have searched but haven't been able to find a solution for this problem.
In an Access 2007 database I have inherited, there is a table, tblLenders, that includes various information on lenders and includes 12 Y/N fields, one for each federal holiday in the year.
There is also a table, tblHolidays, which lists a hoiday name and date for each federal holiday in the year.
I need to figure out how to exclude a record from a query of tblLenders if all of the criteria below are met...
1. Today's Date is present in tblHolidays
2. The Holiday Name in tblLenders is "Y"
Ultimately, I am trying to obtain a list of lenders that are not closed on today's date. Because of the way this data is stored, I can't figure this out.
For example... if today's date (11/11/2010) is in the values in tblHolidays.Hdt, that would be VeteransDay (tblHolidays.Hnm); and tblLenders.VeteransDay = "Y" then this record should be excluded from the query.