If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting criteria to get reslts
I created a tale for product specifications. The product names are formatted
ABC-123. They are selected using a combo box from another table.I am running a simple query but cannot get it to run on my table. For the criteria, I have [enter product name]. When the box comes up and I enter a product, the query comes up blank. If I do not set the criteria, everything comes up fine. I ran the same criteria on the table of product names where my tables selects from and it works. I'm confused as to why I can't select in my specifications table!! |
#2
|
|||
|
|||
Setting criteria to get reslts
On Sun, 9 Aug 2009 09:25:01 -0700, lilczech
wrote: I created a tale for product specifications. The product names are formatted ABC-123. They are selected using a combo box from another table.I am running a simple query but cannot get it to run on my table. For the criteria, I have [enter product name]. When the box comes up and I enter a product, the query comes up blank. If I do not set the criteria, everything comes up fine. I ran the same criteria on the table of product names where my tables selects from and it works. I'm confused as to why I can't select in my specifications table!! I'm guessing that you're yet another victim of the Lookup Field misfeatu is the product name field a Lookup Field in this table? If so what you SEE is ABC-123, but what is actually STORED in the table (and therefore available to the query criteria) is a meaningless number. Try using a combo box as a criterion also (independent of the lookup field issue): you can use a form (frmCrit let's call it) with an unbound Combo Box (cboProduct), and a criterion =[Forms]![frmCrit]![cboProduct] This will let the user select an existing product rather than needing to type one in, and risk errors if they make a minor typo. -- John W. Vinson [MVP] |
#3
|
|||
|
|||
Setting criteria to get reslts
Does your table that you are selecting from have another column that is
the primary key and is an autonumber field? If so, the problem is probably that what you see is the descriptive text name of the product, but what is actually stored is the ID number of the row (the primary key). If that is the case you should be able to enter a valid number to get a record returned. How you fix this depends on a number of factors. So test this and if entering a valid product number works, post back. '================================================= === John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County '================================================= === lilczech wrote: I created a tale for product specifications. The product names are formatted ABC-123. They are selected using a combo box from another table.I am running a simple query but cannot get it to run on my table. For the criteria, I have [enter product name]. When the box comes up and I enter a product, the query comes up blank. If I do not set the criteria, everything comes up fine. I ran the same criteria on the table of product names where my tables selects from and it works. I'm confused as to why I can't select in my specifications table!! |
Thread Tools | |
Display Modes | |
|
|