Creating a query for a value from a combo box on a table

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

Guest

I am fairly new to access, though I have created a couple of simple databases with multiple tables, forms and simple queries. This one has me stumped.
Some setup info:
I have two tables, one called Expenses and one called PmtType. The values in PmtType (Cash, Check, Visa) are set up as a combo box in the Expenses Table. Entering the information in the form works fine, as when I am entering data into a form created for the Expenses Table, I am able to open the combo box and choose Cash, Check, or Visa).

My problem:
I am trying to create a query on the Expenses Table to give me just a listing of all items purchased with Visa. When I set my criteria for PmtType="Visa", my query comes back blank. I tried not setting any criteria, and the query worked by giving me back all of the data in the Expenses Table. But for some reason, I can only surmise because of the Combo Box, I cannot filter my data down to any of the values by PmtType.
Any help or suggestions are greatly appreciated. Thank you.
 
Jax, If you are putting PmtType="Visa" on the criteria row of the query you
need to remove the first part. Try entering just ="Visa"

--
Reggie

----------
JaxScorps said:
I am fairly new to access, though I have created a couple of simple
databases with multiple tables, forms and simple queries. This one has me
stumped.
Some setup info:
I have two tables, one called Expenses and one called PmtType. The values
in PmtType (Cash, Check, Visa) are set up as a combo box in the Expenses
Table. Entering the information in the form works fine, as when I am
entering data into a form created for the Expenses Table, I am able to open
the combo box and choose Cash, Check, or Visa).
My problem:
I am trying to create a query on the Expenses Table to give me just a
listing of all items purchased with Visa. When I set my criteria for
PmtType="Visa", my query comes back blank. I tried not setting any
criteria, and the query worked by giving me back all of the data in the
Expenses Table. But for some reason, I can only surmise because of the
Combo Box, I cannot filter my data down to any of the values by PmtType.
 
Hi Jax,

Welcome to the woes of MS lookup fields. Get rid of them! They violate
relational rules and they invariably lead to troubles when one attempts to
enhance the application. Once you have removed them from your tables and
have repaired the forms based on them you should be well on your way to
getting done what you want. I.e. you'll get the results you expect when you
design a query on your tables.

HTH
--
-Larry-
--

JaxScorps said:
I am fairly new to access, though I have created a couple of simple
databases with multiple tables, forms and simple queries. This one has me
stumped.
Some setup info:
I have two tables, one called Expenses and one called PmtType. The values
in PmtType (Cash, Check, Visa) are set up as a combo box in the Expenses
Table. Entering the information in the form works fine, as when I am
entering data into a form created for the Expenses Table, I am able to open
the combo box and choose Cash, Check, or Visa).
My problem:
I am trying to create a query on the Expenses Table to give me just a
listing of all items purchased with Visa. When I set my criteria for
PmtType="Visa", my query comes back blank. I tried not setting any
criteria, and the query worked by giving me back all of the data in the
Expenses Table. But for some reason, I can only surmise because of the
Combo Box, I cannot filter my data down to any of the values by PmtType.
 
Back
Top