473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Report Listbox

I have a Report with a listbox that I need to populate with a
rowsource type = valuelist.
The valuelist for each record is a saved SQL string complete with
commas
On my form I can set the valuelist in code.
However on the report open or detail format events I cannot set the
valuelist.
Does anyone know of a way to put the SQL string into the rowsource
property of the listbox on the report?
Thanks

May 17 '07 #1
2 2333
On May 16, 8:46 pm, lgeastw...@gmail.com wrote:
I have a Report with a listbox that I need to populate with a
rowsource type = valuelist.
The valuelist for each record is a saved SQL string complete with
commas
On my form I can set the valuelist in code.
However on the report open or detail format events I cannot set the
valuelist.
Does anyone know of a way to put the SQL string into the rowsource
property of the listbox on the report?
Thanks
A listbox in a report? Hmmmm...

May 17 '07 #2
On May 16, 7:46 pm, lgeastw...@gmail.com wrote:
I have a Report with a listbox that I need to populate with a
rowsource type = valuelist.
The valuelist for each record is a saved SQL string complete with
commas
On my form I can set the valuelist in code.
However on the report open or detail format events I cannot set the
valuelist.
Does anyone know of a way to put the SQL string into the rowsource
property of the listbox on the report?
Thanks
Ok, I got it. One way anyway. It's from a post I read. Sorry, can't
remember who to credit.
I append to a temp table "tblRowSrc" which I use for the rowsource of
my listbox
It works fine. I attached code below for anyone interested.
varStr = Me.txtString
Do Until varStr = ""
varInt = InStr(varStr, ",")
If varInt = 0 Then
varRec = varStr
varStr = ""
Else
varRec = Left(varStr, varInt - 1)
varStr = Mid(varStr, varInt + 1)
End If
DoCmd.RunSQL "INSERT INTO tblRowSrc ( fldRowSource )SELECT'" & varRec
& "';"
Loop

May 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Geir Baardsen | last post by:
Hi! On a form I have a listbox that is retrieving data in the form's On_Load event. Now I have two textboxes that will change the listbox's content. How can I send data in the new, updated and...
2
by: Geir Baardsen | last post by:
Hi! From a listbox I'd like to send only selected items to a report. Items will include: OrderNr,Date,EmployeeNr from tblOrders ZipCode,City from tblZipCodes Name,Adr,ZipID from...
2
by: Craig B. | last post by:
I am relativly new to access 2000 and am having some trouble with a report. I am not sure what I want to do is something I can do in access. I want to be able to choose from a combo box multiple...
1
by: bruce | last post by:
Hello, I have a small form that pops up when a user moves off the current record of a rather sizeable data entry form. The purpose of this form is to list warnings about various fields on the...
6
by: vickie | last post by:
I have a sql server7 database using C#. The system runs fine until the user try to run a report. I get the following error: Object reference not set to an instance of an object. Description: An...
2
by: Arnold | last post by:
Greetings Gurus, In a report showing the names of students and their progress, I am getting an error in the name field (Name: #Error). The report gets its data from an unbound form containing...
3
by: ML | last post by:
I have used Allen Brown's technique for filling a listbox on a form with the names of files in a certain disc folder. It works well. I am now giving the user the option to print the form...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
12
by: micarl | last post by:
How would i print a report based on criteria selected from several Combo Boxes as well as multiple Multi Select List Boxes, that are located on the same form? I can get one Multi List Box, just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.