I have an invoice number that is a combination of a sale # , a "-" and a ID number. Example: 388-LA142. I am trying to select all the invoices that start with a specific sale#. I have an unbound text field where I specify the sale#. I keep getting a type mismatch and I can't figure out how to fix it.
This is the code:
Dim strAuction As String
strAuction = Me!txtAuction
DoCmd.Close
DoCmd.OpenForm "frmSaleInvoices", acNormal, , "Left([Invoice],(InStr([Invoice]," - ")-1)" '= & strAuction & "'"
I would appreciate any help you can offer.
This is the code:
Dim strAuction As String
strAuction = Me!txtAuction
DoCmd.Close
DoCmd.OpenForm "frmSaleInvoices", acNormal, , "Left([Invoice],(InStr([Invoice]," - ")-1)" '= & strAuction & "'"
I would appreciate any help you can offer.