locked
Selecting Data In Table Based On Conditions for Multiple fields within it RRS feed

  • Question

  • User1104400338 posted

    Hello. I am using Microsoft Visual Studio, and in Access database I have a table called Batteries. It has the fields ID, Name, Capacity, size, and cost. I have connected each field in the table to dropdownlists as controls, so as to help me view the table based on each field I select in the dropdownlists or combination of fields. I have my select query as SELECT * FROM Batteries WHERE ID = ? OR Name = ? OR Capacity = ? OR Size = ? OR Cost = ?, but the table doesnot show whenever I choose a field in the dropdownlists or a combination of fields. Hence, I decided to connect only two fields to the dropdownlists, SELECT * FROM Batteries WHERE ID = ? OR Name = ?, but data in the table only shows when I choose both the ID dropdownlist and the Name dropdownlist; I can't choose one without the other.

    What Select Query can I use (for all the fields included not just 2) so I can make the data in the  table apear when I choose a just field or a combination of fields?

    Friday, October 7, 2011 1:45 PM

Answers

All replies