473,944 Members | 26,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2356
On May 16, 8:46 pm, lgeastw...@gmai l.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...@gmai l.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
3532
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 changed listbox to a report?
2
4638
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 tblCustomers OrderNr,ItemID,Amount,Price,Discount from tblOrderDetails
2
2113
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 selections in a form and from those selections present them in a report. For example select a selection A,B, and C out of 9 possible choices. Then show them seperated by a comma in a field in the report. I also want the option of only selecting...
1
2488
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 entry form that may be incomplete or inconsistent before the user exits the record. These warnings take the form of items in a listbox. The underlying rowsource of the listbox is a delimited string (value list). I would like to be able to let...
6
2232
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 unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object...
2
1811
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 two unbound textboxes, "txtStartDate" and "txtEndDate," and a multi-select listbox, "listName." I think the error occurs when there is no correct combination of data--for instance, no records for John Doe entered during this past week.
3
2686
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 contents in a report which has the same fields as the form. All fields derived from report query are OK A listbox with design mode rowsource setting, works fine BUT...
1
2508
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 fine). There is then a combo box they can select a field from (eg CompanyID etc) and then the list box below that contains the values (eg Microsoft, Novell etc). These are all multi-select list boxes. Now I can get the code to work if the user...
12
4062
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 not several, to report using this code i found - Private Sub cmdPreview_Click()
0
11545
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11134
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11307
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10673
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9868
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8236
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6313
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3518
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.