T
Thorson
I currently have the following code on one of my forms
Private Sub EarTag_AfterUpdate()
If (DLookup("CalfSex", "tblBirthInformation", "[EarTag]='" & Me![EarTag] &
"'") = "C") Then
DoCmd.OpenForm "frmTHE"
End If
End Sub
The code looks at the Eartag (text) that was entered into
frmDispositionRecordIndID, and compares it to another table, depending on the
sex of that animal in the other table it then opens up a form. I would like
to modify this code to that it does an additional check.
I would like it to also check frmDispositionRecords to see what the
"cboMethod" has for the record of the animal. The frmDispositionRecords and
frmDispositionRecordIndID are related through the record number. I would
like it to look at the matching record and if the only open the form in the
code if the record is "Sold", "Died" or "euthanized".
I'm not sure how to modify the code to do this. If someone could help out
that'd be great!
Private Sub EarTag_AfterUpdate()
If (DLookup("CalfSex", "tblBirthInformation", "[EarTag]='" & Me![EarTag] &
"'") = "C") Then
DoCmd.OpenForm "frmTHE"
End If
End Sub
The code looks at the Eartag (text) that was entered into
frmDispositionRecordIndID, and compares it to another table, depending on the
sex of that animal in the other table it then opens up a form. I would like
to modify this code to that it does an additional check.
I would like it to also check frmDispositionRecords to see what the
"cboMethod" has for the record of the animal. The frmDispositionRecords and
frmDispositionRecordIndID are related through the record number. I would
like it to look at the matching record and if the only open the form in the
code if the record is "Sold", "Died" or "euthanized".
I'm not sure how to modify the code to do this. If someone could help out
that'd be great!