Opening forms with filter

G

Gibson

I have a form that contains invoice numbers and lines. Of course an invoice
may have multiple lines. I would like to open the form to a specific
invoice number and line number but be able to view the additional lines with
the navigation button. I use the following code to open the form to a
specific line but it opens filtered so the navigation button shows only
record.

Is it possible to open it the way I want to?

rs7.FindFirst "Invoice1 = '" & Forms!frm1!InvoiceA & "' AND LineNum = " &
Forms!frm1!LineNum

If Not (rs7.NoMatch) Then
DoCmd.OpenForm "frm7", , , "Invoiced1 = '" & Forms!frm1!InvoiecA &
"' AND LineNum = " & Forms!frm1!LineNum

End If
 
Top