Problems getting query to filter from a listbox

SirDrums

Registered User.
Local time
Today, 09:02
Joined
Jul 15, 2009
Messages
83
I figure that this is either something simple that I am over looking or something fundemental about forms and quries I don't understand yet.


I have a form that has two list boxes lstSelectPlant and lstSelectDrawing

lstSelectPlant is based off a query. It is a single select List Box. It returns one column of records

lstSelectDrawing is based off another Query. There is one field in the query 'Project' that should be filterd based off the selection in lstSelectPlant

I put the following code in the Criteria Section of 'Project' Field:

[Forms]![ECS - Design Views].[lstSelectPlant]

When I run the query I get no records. When I select an item in the list I get no records

When I run the query without the criteria. I get records

When I run the query with one of the possible selections set as the criteria I get records.

I just dont get records when using the listbox.

Any Ideas why?

Thanks!
 
I would try a combo rather than list box; it sounds like your scriteria election is not be fed through.
 
hmmm...


I just tried a combo box and its not working either...

[Forms]![ECS - Design Views].[cmbTest1]

I wonder if there is something wrong with the value it is passing to the query?

The item I select looks correct in the list/combo box but how am I to be sure its passing what I see to the query?

I also thought that perhaps the second list box needed to be 'refreshed' after selecting a value so I added 'Me.lst(or cmb)SelectDrawing.Requery' to the after update event on the list/combo boxes.

Still didn't help.
 

Users who are viewing this thread

Back
Top Bottom