Some background: I've created a database with nesting and banding data for a population of birds. In one form (Individuals) I have data about when the birds were banded. In the Pairs form, I have data about which individuals are partnered up with whom.
I'd like to create a button in the Individuals form where I can see all the pairs that bird has been part of. However, because we can't tell which birds are male and female, there are 2 fields (Adult1ANF and Adult2ANF) in the Pairs form that don't specify sex. Sometimes a bird's ID is entered in the Adult1ANF field, but for other pairs the same ID may be in the Adult2ANF field.
I can create a button to open the Pairs form where the ID field in Individuals is linked with either the Adult1ANF or Adult2ANF fields in Pairs, but I'd like to find all pairs an individual is part of, regardless of whether their ID is in the Adult1ANF or Adult 2ANF field. The following is the code Access created with the Command Button Wizard:
="[Adult1ANF]=" & "'" & [ANF] & "'"
and here are the modifications I've tried that aren't working:
="[Adult1ANF]="Or="[Adult2ANF]=" & "'" & [ANF] & "'"
="[Adult1ANF]=" & "'" & [ANF] & "'"Or="[Adult2ANF]=" & "'" & [ANF] & "'"
="[Adult1ANF]=" & Or="[Adult2ANF]=" &"'" & [ANF] & "'"
="[Adult1ANF]=" & "'" & [ANF] & "'" Or "[Adult2ANF]="
I don't know if what I'm trying to do is even possible, but any suggestions would be appreciated.