Well it opens up the form and that's why I asked if it duplicated samples...
So I want to be able to not only add new data, but go back and look or edit the data.
Code:
Private Sub Command92_Click()
ResultsWrenID = Me.WrenID
ResultsSampleName = Me.SampleName
ResultsTestType = Me.TestType
ResultsFacility = Me.Facility
If ResultsTestType = "NET" Then
DoCmd.OpenForm "NETDataForm"
If (Need code to search "WrenID" in the table "tblNETData") = ResultsWrenID Then
(Open form with this WrenID and it's data for editting)
ElseIf
ResultsWrenID=NewRecord
(tblNETdata("WrenID") = ResultsWrenID)
(tblNETdata("SampleName") = ResultsSampleName)
(tblNETdata("Facility") = ResultsFacility)
(tblNETdata("TestType") = ResultsTestType)
End If
ElseIf ResultsTestType = "COL" Then
DoCmd.OpenForm "ColonDataForm"
If (Need code to search "WrenID" in the table "tblColonData") = ResultsWrenID Then
(Open form with this WrenID and it's data for editting)
ElseIf
ResultsWrenID=NewRecord
(tblNETdata("WrenID") = ResultsWrenID)
(tblNETdata("SampleName") = ResultsSampleName)
(tblNETdata("Facility") = ResultsFacility)
(tblNETdata("TestType") = ResultsTestType)
End If
End If
End Sub