you could use the dlookup function - something like
Code:
dim primaryaddr as long
if me.isprimary=true then
primaryaddr=nz(dlookup("addrID","tblAddresses","IsPrimary=true and PatientID=" & me.patientID),0)
if primaryaddr=me.addrID or primaryaddr=0 then
msgbox "this is the primary address"
else
msgbox "primary address already set"
me.isprimary=false
end if
end if
where you put this code depends on how your form works - the latest event you should use is the address form before update event, but I suspect the best place to put is the isprimary control after update event.
your field names appear to have spaces - bad idea, at some point it will waste you hours of time trying to find an error because of the spaces. If you are doing it so the form/report label 'looks right', use the field caption property, that is what it is for