I have a database I'm creating to track sheep breeding records. My end goal is to be able to pull up a form which will list all of the offspring of a particular buck or ewe. I would like to be able to get it so that the same query and form will pull the results of either a buck or a ewe. The columns that I'm including my criteria for are the lamb's records which have a columns for the ewe (mother) and the buck (father) which are both saved as text rather than numbers. The SheepRecord form is the form for either the buck or the ewe from which i want to open the Offspring form.
My current criteria in the ewe column is:
IIf([Forms]![SheepRecord]![Sex]="Female",[Forms]![SheepRecord]![Tag number], Is Not Null)
The formula works if the sheep is a ewe, but returns no records if the sheep is a buck and i need this particular criteria to then return all records. I think I understand the postings about why Is Not Null doesn't work and if this was the only criteria for the query could get it to work, but i also need a similar formula for the Buck column as well. Any step by step instructions would be helpful (i'm an access beginner with basically no programming knowledge). Thanks for any help that can be given.
My current criteria in the ewe column is:
IIf([Forms]![SheepRecord]![Sex]="Female",[Forms]![SheepRecord]![Tag number], Is Not Null)
The formula works if the sheep is a ewe, but returns no records if the sheep is a buck and i need this particular criteria to then return all records. I think I understand the postings about why Is Not Null doesn't work and if this was the only criteria for the query could get it to work, but i also need a similar formula for the Buck column as well. Any step by step instructions would be helpful (i'm an access beginner with basically no programming knowledge). Thanks for any help that can be given.
Comment