Hello All

Im having trouble with my DataReport. It works perfectly when run the first time. However when the button is run for a second time nothing occurs. and the report doesnt seem to show,

I suspect its something to do with how the parameters are being passed.

Heres the code :

Private Sub cmdPrint_Click()
On Error GoTo err_click
'This sub must handle the name, order number and options
'and process them into queries which print the applicable reports
'!! Must also handle the process types of each order!!
Dim OrderNoStr As Variant
Dim Stk As String
Dim Weight As String
Dim Nameval As String
Dim DateVal As String

'Checks Order Number Value
Nameval = Me.lstNames.Text

If Me.dCboOrderNo.Text = "" Then
MsgBox ("An Order Number must be entered")
Exit Sub
Else
OrderNoStr = Me.dCboOrderNo.Text
End If
'Enters Todays Date if Checked
If chkDate.Value = 1 Then
DateVal = Now()
Else
DateVal = ""
End If

'Ask for Weight if Checked
If Me.ChkWeight.Value = 1 Then
Weight = InputBox("Enter the Weight Value", "Enter Weight")
Else
Weight = ""
End If

'Asks for Code if checked
If Me.ChkStock.Value = 1 Then
Stk = InputBox("Enter the Required code", "Enter Code")
Else
Stk = ""
End If

'Checks either cutting or rewind job
If Me.OptCutting.Value = True Then
DataBackend.qryReportCutting Weight, Stk, DateVal, Nameval, OrderNoStr
LabelsCutting.Show
LabelsCutting.PrintReport (True)

'LabelsCutting.Show
Else
DataBackend.qryReportCutting Weight, Stk, DateVal, Nameval, OrderNoStr
LabelsRewind.Show
LabelsRewind.PrintReport (True)
End If

'Different reports exist for different process types.
'Passes the Parameters to the query
'DataBackend.qryReportCutting Weight, Stk, DateVal, OrderNoStr

err_click:
Exit Sub

End Sub



Could some please give me a hand.

Thanks Alot

Smurfaroonies