troubleshooting Question

using list box column for query criteria

Avatar of wileedingo
wileedingo asked on
Microsoft Access
3 Comments1 Solution518 ViewsLast Modified:

I have a 4-column list box.  I am trying to create a select query that will use the contents of two columns in the list box as criteria.

For now the list box is called List0 and is on a form called frmMakeModelFix1.  The SQL statement I have tried is:

SELECT CabinetRecords.Manufacturer, CabinetRecords.Model, CabinetRecords.Type, CabinetRecords.Size, CabinetRecords.In_Use
FROM CabinetRecords
WHERE (((CabinetRecords.Manufacturer)=[Forms]![frmMakeModelFix1]![List0].Column(0)));

It is supposed to select the records from the table CabinetRecords where the Manufacturer is the same as the Manufacturer
in the selected list box record. Once it works, I will add criteria to further specify that the Model must be the same as that in the
selected list box record.

It doesn't work and gives me the message: "Undefined function '[Forms]![frmMakeModelFix1]![List0].Column' in expression"

It works with the bound column when you don't need to specify the column, just the list name.

Will what I'm trying to do work?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros