I have a form called frmReceiptReview, that has a command button cmdPaidInv - see code below. I would like this code to open the form "frmInvoiceByCustomer", and show only the invoices that have had cash applied. The cash applied is in the subform "child26" in the text box "ReceiptValue".
Currently the code opens the correct form, but returns no records.
I'm not sure if it is my code (i.e. the filter part) that is wrong - where I reference the ReceiptValue control on the subform or what.
Private Sub cmdPaidInv_Click()
Dim strDocName As String
Dim strFilter As String
Dim intVal As Integer
On Error GoTo Err_cmdPaidInv_Click
intVal = 0
strDocName = "frmInvoiceByCustomer"
strFilter = "[Forms]![frmInvoiceByCustomer].[Child26]![ReceiptValue] >" & intVal
'Forms!Orders![Orders Subform].Form.GetProductID
DoCmd.OpenForm strDocName, , , strFilter
Exit_cmdPaidInv_Click:
Exit Sub
Err_cmdPaidInv_Click:
MsgBox Err.Description
Resume Exit_cmdPaidInv_Click
End Sub
Confused half the time, going around in circles the other half. Any help would be appreciated
Currently the code opens the correct form, but returns no records.
I'm not sure if it is my code (i.e. the filter part) that is wrong - where I reference the ReceiptValue control on the subform or what.
Private Sub cmdPaidInv_Click()
Dim strDocName As String
Dim strFilter As String
Dim intVal As Integer
On Error GoTo Err_cmdPaidInv_Click
intVal = 0
strDocName = "frmInvoiceByCustomer"
strFilter = "[Forms]![frmInvoiceByCustomer].[Child26]![ReceiptValue] >" & intVal
'Forms!Orders![Orders Subform].Form.GetProductID
DoCmd.OpenForm strDocName, , , strFilter
Exit_cmdPaidInv_Click:
Exit Sub
Err_cmdPaidInv_Click:
MsgBox Err.Description
Resume Exit_cmdPaidInv_Click
End Sub
Confused half the time, going around in circles the other half. Any help would be appreciated