Code:
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
If Text19.value = "" Then
MsgBox "Please fill number of copies"
End If
Dim result As Integer
If Check_Print = True Then
result = 1
End If
If line1_chk.value = -1 Then
CheckTable ("W177-L")
If showme = 1 Then
MsgBox "Result is: " & showme
'DoCmd.OpenReport "Print_W177-L", acViewPreview
'If result = 1 Then
'DoCmd.PrintOut , , , , Text19.Value, False
'End If
Else
MsgBox "Result is: " & showme
End If
End If
If line2_chk = True Then
DoCmd.OpenReport "Print_H247-L", acViewPreview
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line3_chk = True Then
DoCmd.OpenReport "Print_W177-R", acViewPreview
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line4_chk = True Then
'Lets check combined Lines shitss pff..
If MsgBox("Click Yes for V177-L or No for W177-L !", vbYesNo + vbQuestion) = vbYes Then
DoCmd.OpenReport "Print_V177-L", acViewPreview
Else
DoCmd.OpenReport "Print_W177-L", acViewPreview
End If
'end this shit...
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line5_chk = True Then
DoCmd.OpenReport "Print_W247-L", acViewPreview
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line6_chk = True Then
DoCmd.OpenReport "Print_H243-L", acViewPreview
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line7_chk = True Then
'Lets check combined Lines shitss pff..
If MsgBox("Click Yes for H247-R or No for W247-B !", vbYesNo + vbQuestion) = vbYes Then
DoCmd.OpenReport "Print_H247-R", acViewPreview
Else
DoCmd.OpenReport "Print_W247-R", acViewPreview
End If
'end this shit...
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
If line8_chk = True Then
'Lets check combined Lines shitss pff..
If MsgBox("Click Yes for H243-R or No for V177-R !", vbYesNo + vbQuestion) = vbYes Then
DoCmd.OpenReport "Print_H243-R", acViewPreview
Else
DoCmd.OpenReport "Print_V177-R", acViewPreview
End If
'end this shit...
If result = 1 Then
DoCmd.PrintOut , , , , Text19.value, False
End If
End If
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click
End Sub