mardi 13 septembre 2016

Access query with join returns checkbox as null value

This is very strange even for my limited knowledge of Access. Background information: I have designed a single table database which tracks all the people I work with. This is just a sample of what it would look like:

tblPersonnelDatabase (filtered by personnel leaving within 90 days)

LastName ; FirstName ; DepartureDate ; ReplacementRecordID

qryReplacementInfo

LastName ; FirstName; ArrivalDate; RecordID; SponsorPackage

The purpose of ReplacementRecordID is to identify the person who will be replacing them. So when we are notified of a new arrival to this site, we create a record for them, and we place their Record ID number in the person who they will be replacing. This was all so that I could generate a report which shows who is leaving, and who will be replacing them.

I used a pretty simple RIGHT JOIN between in SQL to make this happen, between ReplacementRecordID and Record ID. This resulted in a datasheet displaying all records from personnel database for people leaving within 90 days, and next to them their replacement. Simple! It works great, with one exception.

SponsorPackage is a Yes/No field, which I use to tell if the person on arrival has been contacted. Its value is set to default NO in my table, yet no matter what happens, when I join the query with my table, this field results in a NULL value (appears as a blue box) where ever it was originally FALSE. Cannot figure out why it does this.




Aucun commentaire:

Enregistrer un commentaire