J
jwr
I created a packing list form that I want to open and open the packing list
report when I select the preview packing list command button on the customer
form. I get the form to open, but I do not get the report behind the print
packing list form to open. What am I missing? Do I need another command to
open the Packing List Report? thanks in advance, JR
CODE BEHIND "PREVIEW PACKING LIST" ON ORDERS BY CUSTOMER FORM:
Private Sub Preview_Packing_List_Click()
On Error GoTo Err_Preview_Packing_List_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Packing List"
Me.Dirty = False
stLinkCriteria = "[CustomerID]=" & Me![CustomerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Preview_Packing_List_Click:
Exit Sub
Err_Preview_Packing_List_Click:
MsgBox Err.Description
Resume Exit_Preview_Packing_List_Click
End Sub
CODE BEHIND "PRINT PACKING LIST FORM"
Private Sub Form_Open(Cancel As Integer)
If Not IsLoaded("Orders by Customer") Then
MsgBox "Open the Print Packing List form using the Preview Packing
List button on the Orders by Customer form."
Cancel = True
End If
End Sub
Private Sub OK_Click()
Me.Visible = False
End Sub
Private Sub Cancel_Click()
DoCmd.Close acForm, "Print Packing List"
End Sub
report when I select the preview packing list command button on the customer
form. I get the form to open, but I do not get the report behind the print
packing list form to open. What am I missing? Do I need another command to
open the Packing List Report? thanks in advance, JR
CODE BEHIND "PREVIEW PACKING LIST" ON ORDERS BY CUSTOMER FORM:
Private Sub Preview_Packing_List_Click()
On Error GoTo Err_Preview_Packing_List_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Packing List"
Me.Dirty = False
stLinkCriteria = "[CustomerID]=" & Me![CustomerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Preview_Packing_List_Click:
Exit Sub
Err_Preview_Packing_List_Click:
MsgBox Err.Description
Resume Exit_Preview_Packing_List_Click
End Sub
CODE BEHIND "PRINT PACKING LIST FORM"
Private Sub Form_Open(Cancel As Integer)
If Not IsLoaded("Orders by Customer") Then
MsgBox "Open the Print Packing List form using the Preview Packing
List button on the Orders by Customer form."
Cancel = True
End If
End Sub
Private Sub OK_Click()
Me.Visible = False
End Sub
Private Sub Cancel_Click()
DoCmd.Close acForm, "Print Packing List"
End Sub