How to update ListBox.RowSource property when printing

G

Guest

In a detail section I have a listbox whose rowsource needs to be updated by a
query string in the OnFormat event. The query selects records based on the
value of a product (the product is printed in the detail section). However I
get a message saying the rowsource cannot be updated when a report is opened
in preview mode or has started printing.

So how does a query dependant listbox work in a report?
 
K

Ken Snell \(MVP\)

Why use a listbox in a report? Use a subreport instead, and set the
recordsource of the subreport to the desired query from the main report's
programming.
 

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

Top