UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Listbox As A Record Source For The Report, Access 2016    
 
   
marinko888
post Sep 5 2019, 05:49 AM
Post#1



Posts: 65
Joined: 9-April 19



Hi,
I was wandering is it possible to use ListBox as the Record Source for the Report? I suppose that I would have to iterate through the Listbox and pass the results to the Report...Does anybody have an example of the solution or maybe has a useful idea of how to do that dynamically in VBA?

Any suggestion would be appreciated.

Thanks,
Go to the top of the page
 
arnelgp
post Sep 5 2019, 06:33 AM
Post#2



Posts: 1,472
Joined: 2-April 09
From: somewhere out there...


may we know why listbox?
if listbox is based on table, then why again.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
marinko888
post Sep 5 2019, 06:39 AM
Post#3



Posts: 65
Joined: 9-April 19



I have to show Report before saving data from ListBox to database. Data on the ListBox is combined from complex select Query and ComboBox selected Item.
This post has been edited by marinko888: Sep 5 2019, 06:43 AM
Go to the top of the page
 
PaulBrand
post Sep 5 2019, 06:41 AM
Post#4



Posts: 1,723
Joined: 4-September 02
From: Oxford UK


What is the rowsource of the list box?

--------------------
Paul
Go to the top of the page
 
marinko888
post Sep 5 2019, 06:45 AM
Post#5



Posts: 65
Joined: 9-April 19



Row source is combination of select Query and CombiBox Selected Item.
Go to the top of the page
 
PaulBrand
post Sep 5 2019, 07:20 AM
Post#6



Posts: 1,723
Joined: 4-September 02
From: Oxford UK


Then that query can also be the record source for your report - no need to save the items anywhere.

--------------------
Paul
Go to the top of the page
 
GroverParkGeorge
post Sep 5 2019, 08:53 AM
Post#7


UA Admin
Posts: 35,886
Joined: 20-June 02
From: Newcastle, WA


The problem I see in using the query directly is that it may need to be filtered for the report, based on items selected in the listbox. If that is the case, it'll require creating a new recordset based on that filter anyway.

But beyond that, I'm not sure I even understand how you'd use a listbox to provide records to a report without relying on the query for that listbox.

Perhaps a more detailed explanation of the situation will help us come to a more useful suggestion or two.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    19th October 2019 - 04:48 AM