Re: Listbox Rowsource
- From: ScottS <ScottS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 19 Jan 2008 11:00:00 -0800
Thanks for the response.
I wanted to use the list box because I like the way it displays the data. I
have a form where users enter lot numbers for defective materials. They scan
in as many lot numbers as they need to -- I display what they scan in on a
list box on the form.
I store all the lot number in a string to one field in my table. When I
need to display the lot numbers again on the form I set the rowsource
property of the form's list box to the string I stored and it displays just
fine.
I was hoping to do the same on the report but realize that this not
possible, however I do find it annoying that the list box control is
available for reports but you can't really control it. Fredg explains why in
the other response to my post.
I realize that I'll have to look for another approach.
Thanks again for your help.
--
Scott S
"Rick Brandt" wrote:
ScottS wrote:.
Is it possible to change the rowsource for a listbox on a report
using VBA?
Pretty unusual to use a listBox in a report, but other than that you shoudl be
able to do it.
Me.ListBoxName.Rowsource = "SomeNewRowsource"
There is a good chance that you will not be able to do this in any event other
than report Open event though. You would have to test any others. Many things
like this that can be done on a form can only be done on a report in the open
event. Once the printing process starts they become read only.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
- References:
- Re: Listbox Rowsource
- From: Rick Brandt
- Re: Listbox Rowsource
- Prev by Date: Re: Listbox Rowsource
- Next by Date: Re: Subgroup or Subreport?
- Previous by thread: Re: Listbox Rowsource
- Next by thread: Re: Listbox Rowsource
- Index(es):
Relevant Pages
|