I've created the query on InvoiceID which is a large number. I have already created the search drop down box showing numbers in order. However when I select the number the Subform blanks out (there is data) rather than showing the results of the InvoiceId. I have used this code on other searches but I think my challenge is how to use it for NUMBERS rather than text. I tried to convert the numbers into text using a query however didn't seem to work either...
FormName: Invoice Search by Combobox
Drop down box located on the Invoice Search by Combobox form: INVOICEID is equal to Name: InvoiceIDcbo with Data, RowSource is set to: InvoiceID Number Search by Combox
Query: LoanInvoiceALLQ Field: InvoiceID (large number value)
Subform: LoaninvoiceALL that does have the field: InvoiceID (large number value)
Added the drop down box to execute after update as follows (InvoiceIDcbo):
Private Sub InvoiceIDcbo_AfterUpdate()
Dim myInvoiceID As String
myInvoiceID = "Select * from LoanInvoiceALLQ where ([InvoiceID] = ' & Me.InvoiceIDcbo & ')" (think this is where my error is!)
'myInvoice = "Select * from LoanInvoiceALLQ where ([InvoiceID] = '" & Me.InvoiceIDcbo & "')" (I also tried this but this is for text not numbers).
Me.LoanInvoiceALL.Form.RecordSource = myInvoiceID (this is where it errors out)
Me.LoanInvoiceALL.Form.Requery
Me.cboBPA = Null
Me.CboCallOrder = Null
Me.cmdInvoiceId.Visible = False
Me.cmdInvoiceId.Visible = True
End Sub
Thanks for your special talents!
FormName: Invoice Search by Combobox
Drop down box located on the Invoice Search by Combobox form: INVOICEID is equal to Name: InvoiceIDcbo with Data, RowSource is set to: InvoiceID Number Search by Combox
Query: LoanInvoiceALLQ Field: InvoiceID (large number value)
Subform: LoaninvoiceALL that does have the field: InvoiceID (large number value)
Added the drop down box to execute after update as follows (InvoiceIDcbo):
Private Sub InvoiceIDcbo_AfterUpdate()
Dim myInvoiceID As String
myInvoiceID = "Select * from LoanInvoiceALLQ where ([InvoiceID] = ' & Me.InvoiceIDcbo & ')" (think this is where my error is!)
'myInvoice = "Select * from LoanInvoiceALLQ where ([InvoiceID] = '" & Me.InvoiceIDcbo & "')" (I also tried this but this is for text not numbers).
Me.LoanInvoiceALL.Form.RecordSource = myInvoiceID (this is where it errors out)
Me.LoanInvoiceALL.Form.Requery
Me.cboBPA = Null
Me.CboCallOrder = Null
Me.cmdInvoiceId.Visible = False
Me.cmdInvoiceId.Visible = True
End Sub
Thanks for your special talents!