Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompting for record 1

Status
Not open for further replies.

mclellan

Programmer
Aug 6, 2002
294
CA
Hello,

I have a form bound to my invoice table, and I created an unbound combo box based on my customers.

In the AfterUpdate event, I added the code:
Private Sub Combo11_AfterUpdate()

Me.Filter = "tblInvoices.InvoiceID In(SELECT tblInvoices.InvoiceID FROM tblInvoices WHERE tblInvoices.InvoiceID = Me!Combo11)"
Me.FilterOn = True

End Sub

For some reason, every time I change my combo dropdown, I get asked for the parameter value Me!Combo11.

Not sure what I am missing!

Thanks for your help
Barry
 
What about simply this ?
Me.Filter = "tblInvoices.InvoiceID = " & Me!Combo11

I assumed that InvoiceID is defined as numeric in tblInvoices.


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks that fixed the prompting!!


Have a great day
mclellan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top