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

List Checkbox

Hi,

I am loading data into a listcheckbox at form load.
I want to make sure tht all the checkboxes in the listbox are check how do I do this


Sub PopulateListBox()
Dim strSQL As String
Dim rsRoute As Dao.Recordset
Dim temp As Long

strSQL = "SELECT Distinct(Item) FROM ItemsInOrder;"

Set rsRoute = gdbFML.OpenRecordset(strSQL, dbOpenDynaset)
i = 0
If Not rsRoute.EOF Then

rsRoute.MoveFirst
Do While Not rsRoute.EOF
temp = rsRoute!item
'MsgBox temp
List1.AddItem temp, i
rsRoute.MoveNext
i = i + 1
Loop
Else
MsgBox "No Data available"
Unload Me
End If
End Sub


This is my subroutine which populates the listbox

Thanx in advance
Sep 7 '07 #1
2 1099
QVeen72
1,445 Expert 1GB
Hi,

Change ur loop :

Expand|Select|Wrap|Line Numbers
  1. Do While Not rsRoute.EOF
  2.    temp = rsRoute!item
  3.    List1.AddItem temp, i
  4.    List1.Selected(List1.NewIndex) = True
  5.    rsRoute.MoveNext
  6.    i = i + 1
  7. Loop
  8.  
REgards
Veena
Sep 7 '07 #2
Cool thanx a lot it works
Sep 7 '07 #3

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

Similar topics

10
by: Steve | last post by:
I'm not sure if I should be using tables here to structure the layout or if CSS is okay. I have a data entry form in which I have floated the labels to one side, and given them a specific width....
3
by: Cheddar | last post by:
I'm back again with another problem. What I want is for the user to click a checkbox and have a list appear. I think the code is almost there but it doesnt seem to be working, grrrr. Can anyone...
0
by: Steven | last post by:
Hi, I'm creating a custom checkbox list control which will take 2 arraylists as input. (One will contain Names and other will contain 0s and 1s. 0 - uncheck 1- check). I'm able to create the...
2
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine...
1
by: adam | last post by:
h How do i get an asp checkBoxList to emit client script. I want it so that when each checkbox is clicked, i can cause some action to happen i tried CheckBoxList cbl = new CheckBoxList()...
1
by: Vikram | last post by:
How to disble a particular checkbox list item in a checkbox list
4
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
3
by: MikeB | last post by:
I'm trying to do something and I'm sure there is a good technique for it, but I just can't figure it out. I have some member records in a database. I want to display a list of them, and have a...
2
by: ndeeley | last post by:
Hello, I've written a script which returns the admin rights of users in a table - their access level, and their priviledges. The priviledge are returned to a check box and the admin rights to a...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.