Designing Query criteria from VB

F

filo666

Hi, I have a query named "Salidas", I want a code in VB that opens that query
(docmd.openquery "Salidas") and define a criteria in the column "Tipo" (that
can be "facturas", "Notas" or "Sal. Int.").
Example:
Show just the "factura" or "nota"
TIA
 
M

Michel Walsh

Hi,



ListBoxName.RowSource="SELECT * FROM Salidas WHERE tipo
IN('facturas', 'notas', 'Sal. Int') "


should display the records in the names listbox (inside the actual form
running this code ).



Hoping it may help,
Vanderghast, Access MVP
 
Top