Requery Issue

A

Asif

I have a listbox that displays Date and Quantity above the listbox is
a textbox that holds the year . On the After Update event of this
textbox I have the following expression

=Text14.Requery

When I change the entry in the textbox from 2007 to 2008 the listbox
contents is emptied as there is no data for 2008.

Now I've placed another listbox in this form and have tried to apply
the same syntax as above for this listbox but nothing happens when I
change the year.

Any suggestions??

Thanks
 
S

Steve Schapel

Asif,

I believe it is not correct to have the = sign in the context of the
code you showed. Should be:
Me.Text14.Requery

But what is Text14 anyway? Is it the name of the Listbox?

What is the Row Source of the Listbox? Is it a query that uses the
value of the Textbox in the Criteria?

How about the second Listbox? Does it also have a reference in its Row
Source query to the Textbox?
 
A

Asif

Asif,

I believe it is not correct to have the = sign in the context of the
code you showed. Should be:
Me.Text14.Requery

But what is Text14 anyway? Is it the name of the Listbox?

What is the Row Source of the Listbox? Is it a query that uses the
value of the Textbox in the Criteria?

How about the second Listbox? Does it also have a reference in its Row
Source query to the Textbox?

--
Steve Schapel, Microsoft Access MVP







- Show quoted text -

Thanks Steve for your reply, after read your response I looked at the
rowsource for the listbox and yes there was I criteria specified,
which I did not apply to the second listbox.

Its working well now, thanks for the tip

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Requery listbox 1
Listbox and Textbox 1
Storing values from listbox 3
Textbox, Date Function 1
Listbox ListCount 2
Evaluate ListBox Value 8
Requerying a ListBox 3
Refreshing List box 2

Top