Designing Query criteria from VB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top