sanders720
Programmer
Everything works until I get to the if then statement, when I get an "end with without block if" error. Can you tell me why?
Private Sub Command4_Click()
Dim sql As String
Dim rs As Recordset
Dim rscheck As Boolean
sql = "SELECT InAssy_Yes FROM tblSubAssyListing WHERE JobNo = " & Combo8.Value & " AND SubAssy = '" & Combo22.Value & "'"
Set rs = CurrentDb.OpenRecordset(sql)
Set rscheck = rs("InAssy_Yes"
rs.Close
Set rs = Nothing
If rscheck = True Then
MsgBox ("You must do an ECO to ADD NEW, MODIFY, REMAKE or QUANTITY CHANGE Parts on this Sub"
Else
OpenReport "rptManufactured Parts List", True
End If
End Sub
Thank You
Private Sub Command4_Click()
Dim sql As String
Dim rs As Recordset
Dim rscheck As Boolean
sql = "SELECT InAssy_Yes FROM tblSubAssyListing WHERE JobNo = " & Combo8.Value & " AND SubAssy = '" & Combo22.Value & "'"
Set rs = CurrentDb.OpenRecordset(sql)
Set rscheck = rs("InAssy_Yes"
rs.Close
Set rs = Nothing
If rscheck = True Then
MsgBox ("You must do an ECO to ADD NEW, MODIFY, REMAKE or QUANTITY CHANGE Parts on this Sub"
Else
OpenReport "rptManufactured Parts List", True
End If
End Sub
Thank You