In looking at the code, you never assigned a value for "tempSt" in the ELSEIF Me.Edit = "View" clause. I don't know it this will run correctly, but I modified your code.
Code:
Private Sub Edit_Click()
On Error GoTo Err_Edit_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim tempStr As String
stDocName = "frmCertificationEdit"
If Me.Edit.Value = "NLN" Then
MsgBox "This item has been flagges as 'No Longer Needed'.", vbExclamation + vbOKOnly
ElseIf Me.Edit = "View" Then
modMain.certificateCount = Me.tbCertificationCount
stLinkCriteria = "1=1" & " AND " & "tblCertifications.[CertDateID] = " & Me.CertDateID
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
If IsNull(Forms!frmCertifications.cbFullName.Column(1)) Then
tempStr = Forms!frmCertifications.cbFullName & ", " & Forms!frmCertifications.tbFirstName
Else
tempStr = Forms!frmCertifications.cbFullName.Column(1) & ", " & Forms!frmCertifications.tbFirstName
End If
Forms!frmCertificationEdit.labelTitle.Caption = "Recertification Details for " & tempStr
ElseIf Me.Edit = "New" Then
modMain.certificateCount = Me.tbCertificationCount
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
If IsNull(Forms!frmCertifications.cbFullName.Column(1)) Then
tempStr = Forms!frmCertifications.cbFullName & ", " & Forms!frmCertifications.tbFirstName
Else
tempStr = Forms!frmCertifications.cbFullName.Column(1) & ", " & Forms!frmCertifications.tbFirstName
End If
Forms!frmCertificationEdit.cbempid.Locked = False
Forms!frmCertificationEdit.cbempid = tempStr
Forms!frmCertificationEdit.labelTitle.Caption = "Recertification Details for " & tempStr
Forms!frmCertificationEdit.cbCertDepartment = Forms!frmCertifications.empdept.Column(0)
Forms!frmCertificationEdit.cbcertSupervisor = Forms!frmCertifications.empSupervisor
Forms!frmCertificationEdit.cbCertDepartment.SetFocus
Forms!frmCertificationEdit.cbempid.Locked = True
End If
Exit_Edit_Click:
Exit Sub
Err_Edit_Click:
MsgBox Err.Description
Resume Exit_Edit_Click
End Sub
I also cleaned up some other things I saw: you don't need to add ".Value" as that is the default property.
You don't need the "GOTO" line because the code will 'fall through' to the the END IF and exit properly.
And the proper way (not the only way) to refer to other forms is:
Forms!formName.controlName, not "Form_frmCertificationEdit"