COMBO BOX PROBLEM-Any help ?

D

dk

Hello everybody !
I have form with listbox "Suppliers" and subform called "recieved invoices".
Recieved invoices subform source is query like "Select invoices where
Supplier ID=List Box" (simplified)
Now, Id like to put combobox to reduce displayed invoices to years.
I changed query behind subform into "Select invoices where
supplierID=Listbox & Year(Invoicedate)=Combobox"
The problem is when I need to see all invoices concerning particular
supplier.
How can I put into Combobox value All invoices

Thank You for Your suggestions

DK
 
A

Arvin Meyer

I'm sure you set the subform data to requery each time the list box or combo
box are updated. So the trick is to force an update. I'd add a command
button which cleared the selection and force the requery. (aircode)

Sub cmdComboClear()
Me.MyCombobox = ""
Me.RecordSource = "Select Invoices Where Supplier ID=List Box"
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top