I'm sure this is pretty straight forward but i can't figure it out.
Im getting a compile error, Block if without end if on the following code
Im getting a compile error, Block if without end if on the following code
Code:
Option Compare Database
Private Sub cmdOK_Click()
If Len(Me.cboPermitType & vbNullString) = 0 Then
MsgBox "Please select a Permit Type"
Else
If cboPermitType.Value = 1 Then
DoCmd.OpenForm "subfrmHotWork", , , , acFormAdd
DoCmd.Close acForm, "frmPermitsearch", acSaveNo
Else
If cboPermitType.Value = 2 Then
DoCmd.OpenForm "subfrmLineBreak", , , , acFormAdd
DoCmd.Close acForm, "frmPermitsearch", acSaveNo
Else
If cboPermitType.Value = 3 Then
DoCmd.OpenForm "subfrmConfinedSpace", , , , acFormAdd
DoCmd.Close acForm, "frmPermitsearch", acSaveNo
End If
End Sub