Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2004

    Unanswered: Search in subform

    I have a search (invoice) button on each line of the subform. When the search screen is open, user selects an invoice which should return on the invoice number field of the row where search buttom was pressed. In the search screen, I have the following code

    Forms![frmInvoicePmt2].[frmSubPmtDtl].[Form]![InvoiceNumber] = Forms![frmPmtSearch2].Form![lstBySearchType]
    SendKeys "{ESC}"
    DoCmd.SelectObject acForm, "frmInvoicePmt2"

    I can see the invoice number populate on the subform but if I add a DoCmd.Close line, the invoice number does not save. If I have code as stated above, and then close the form using another button (Cancel), I get result I'm looking for. But I don't want to have to press cancel to close. Any ideas?
    Last edited by brmk; 12-11-05 at 21:09.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts