473,396 Members | 1,859 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,396 software developers and data experts.

display the selected records in the data report

hai,
i am using access database. Iam selecting few records based on a condition. For e:g select * from stud where avg>90 and placing these records in a multiselect list box. for e:g if there 10 records and i want to print any two selected records from the list box in the data report. How is it possible? Please help.

thanks
indra.
Dec 11 '06 #1
2 3133
hai,
i am using access database. Iam selecting few records based on a condition. For e:g select * from stud where avg>90 and placing these records in a multiselect list box. for e:g if there 10 records and i want to print any two selected records from the list box in the data report. How is it possible? Please help.

thanks
indra.
1) Create a temperory table fields are which you want to Place on data report
2) cnn.Execute "Delete * from temporary Table Name"
For i = 1 To lstvRegistration.ListItems.count
If lstvRegistration.ListItems(i).Selected = True Then
j = j + 1
If rs.State = 1 Then
rs.Close
End If
rs.Open "select * from Registration where ID=" &
lstvRegistration.ListItems(i).Text & "", cnn, adOpenStatic
If rs.EOF <> True And rs.BOF <> True Then
If rs.Fields(0) <> "" Then
cnn.Execute "Insert into temp.Tbl Name Values (Fields which you
want to place in Data report )"
End If
End If
End If
Next i

After that you Simply Load report and show it.
Dec 12 '06 #2
1) Create a temperory table fields are which you want to Place on data report
2) cnn.Execute "Delete * from temporary Table Name"
For i = 1 To lstvRegistration.ListItems.count
If lstvRegistration.ListItems(i).Selected = True Then
j = j + 1
If rs.State = 1 Then
rs.Close
End If
rs.Open "select * from Registration where ID=" &
lstvRegistration.ListItems(i).Text & "", cnn, adOpenStatic
If rs.EOF <> True And rs.BOF <> True Then
If rs.Fields(0) <> "" Then
cnn.Execute "Insert into temp.Tbl Name Values (Fields which you
want to place in Data report )"
End If
End If
End If
Next i

After that you Simply Load report and show it.


yes,thanks is it possible without using temp tables and i want to select the records in a list box. is this possible.
thanks
indra
Dec 12 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
1
by: freetime | last post by:
Greetings, This is my first post so I will try to be brief and accurate. I have a report that uses 9 user selectable filters (Dates, Y/N's as Combo Boxes and 4 Multi-Select List Boxes. ...
2
by: kurtzky | last post by:
i created a form that should function as follows: i will enter a number in a textbox..then it should query from the database all the records which has that number..these records will have a...
9
by: shalskedar | last post by:
Access can store how many maximum number of records for a db.. Wanted to know what is the limitation of total number of records that Access db can store
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.