Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 03:02 PM
Ed
Guest
 
Posts: n/a
Default Requery Subreport list-box control

Hello!

I have a report that includes a subreport. They are linked together by
a common ID field. The subreport contains 6 controls, 5 of them text
boxes with a control source and one of them is a list box based on a
query.

The text boxes that have a control source show the correct data for
multiple records of the subreport but the listbox is only queried once
and it does not change for other records.

All the queries and linked fields are correct. Is there a way to
requery the list box for every record in the subreport. Something like
OnCurrent() maybe.

Thank you!

Ed
  #2  
Old November 12th, 2005, 03:03 PM
Ed
Guest
 
Posts: n/a
Default Re: Requery Subreport list-box control

I solved this problem by requerying the listbox control in the OnPrint
method of the subreport.

report
subreport
onprint
listboxt.requery


I noticed that a lot of people had asked about this question but very
few had answers. The onprint() can be used just like the oncurrent()
for the form. It is a little bit misleading because the name lets one
think that it will be called right before the request is sent to the
printer, but that is not the case. It is called when the report is
generated to the screen.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,174 network members.