Query Criteria syntax problem

BJF

Registered User.
Local time
Today, 03:24
Joined
Feb 19, 2010
Messages
137
Hi,

Would someone please help me?! im not sure what im doing wrong here.

I cant get my listbox to filter to a specific set of records based on the query criteria for the listbox.

I have a list box on a subform of my main form.

here is the criteria i have in the [acct] field of the rowsource of my listbox:


[forms]![frmBillToShipToNew]![frmSamples].[form]![Acct]

...and this gives me an empty listbox.


Now, i went ahead and created a text field on my subform with the same set as the control source (=[forms]![frmBillToShipToNew]![frmSamples].[form]![Acct])

.and it dsiplays the [acct] number just fine. it matches my field [acct] that is on the form as well.

yet my listbox will not filter the records according to that criteria.

also, i keep using a specific record (from the main form) as a test because i know that there are records in my listbox that pertain to that [acct];

and if i manually put the [acct] number into the criteria of my listbox query, then it displays the 2 records that i want it to.

any advice would be greatly appreciated
thank you.
 
Are you requerying the listbox after making an entry in the textbox?

Me.ListboxName.Requery
 

Users who are viewing this thread

Back
Top Bottom