By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Listbox - Requery

P: n/a
All

I have a listbox in a form footer. When the form footer is visible the
listbox requeries fine but when I turn the form footer visible=false
the listbox does not requery at all. What I am trying to achieve is to
change the listbox's rowsource, as I said this works fine when the form
footer is visible but then nothing happens when the form footers is
invisible. I know the rowsource is changing in the listbox but it
doesn't requery. The funny thing is that when I try moving the
listbox to the form details and even if the listbox in invisible all
works fine the problem is when the listbox is in the form footer and
the form footer is invisible.

for reference this is the code I'm using to change the listbox's
rowsource

Select Case Me.txtCategory
Case Is = 1
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
Case Is = 2
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
Case Is = 3
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
End Select

Any suggestions on how I could solve this problem?
Thanks in advanced

GAVO.

Jul 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
What are you trying to accomplish by requerying something you can't
see? Is the information used elsewhere? Is there a reason it needs to
be on the form footer? There may be a more practical solution if more
information is presented.
ANDRESUK wrote:
All

I have a listbox in a form footer. When the form footer is visible the
listbox requeries fine but when I turn the form footer visible=false
the listbox does not requery at all. What I am trying to achieve is to
change the listbox's rowsource, as I said this works fine when the form
footer is visible but then nothing happens when the form footers is
invisible. I know the rowsource is changing in the listbox but it
doesn't requery. The funny thing is that when I try moving the
listbox to the form details and even if the listbox in invisible all
works fine the problem is when the listbox is in the form footer and
the form footer is invisible.

for reference this is the code I'm using to change the listbox's
rowsource

Select Case Me.txtCategory
Case Is = 1
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
Case Is = 2
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
Case Is = 3
Me.lstCategory.RowSource = "SQL....
Me.lstCategory.Requery
End Select

Any suggestions on how I could solve this problem?
Thanks in advanced

GAVO.
Jul 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.