Click here to Skip to main content
15,887,477 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerWhy just the form name? Pin
Gregory Gadow9-Sep-08 8:05
Gregory Gadow9-Sep-08 8:05 
QuestionCreate a Semi Background Transparant Form Pin
pdnet9-Sep-08 3:58
pdnet9-Sep-08 3:58 
AnswerRe: Create a Semi Background Transparant Form Pin
Manas Bhardwaj9-Sep-08 4:13
professionalManas Bhardwaj9-Sep-08 4:13 
GeneralRe: Create a Semi Background Transparant Form Pin
pdnet9-Sep-08 19:15
pdnet9-Sep-08 19:15 
QuestionChecking "previously checked" items in a checkbox Pin
C0ley9-Sep-08 3:32
C0ley9-Sep-08 3:32 
AnswerRe: Checking "previously checked" items in a checkbox Pin
Wendelius9-Sep-08 9:09
mentorWendelius9-Sep-08 9:09 
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley9-Sep-08 9:46
C0ley9-Sep-08 9:46 
GeneralRe: Checking "previously checked" items in a checkbox Pin
Wendelius9-Sep-08 10:10
mentorWendelius9-Sep-08 10:10 
Okay, first point (based on documentation, which is a bit confusing after your observations)

CheckedListBox.DataSource Property
Gets or sets the data source for the control. This property is not relevant for this class

Back to your question, instead of MoveNext (which doesn't exist) you could use the indexer of Items property (well actually indexer of the ListBox.ObjectCollection class)

In VB I recall that the syntax is
cboMyTable.Item(counter)

However you could also modify the SQL statement so that you don't loop each item in the listbox, but instead you first get all the records and then match them to items. In this case you would use SQL statement like
SELECT ID, OtherID FROM tblMANYTOMANY WHERE OtherID=65
and then fill a datatable based on that and for each row found in datatable, check the corresponding item in the listbox. Although you mentioned that modifying the query wasn't the first option, this would significantly bring scalability to database operations especially if you plan to upgrade to server side database such as SQL Server

Hope this helps,

Mika
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 0:05
C0ley10-Sep-08 0:05 
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 0:14
C0ley10-Sep-08 0:14 
GeneralFIXED - Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 2:20
C0ley10-Sep-08 2:20 
GeneralRe: FIXED - Checking "previously checked" items in a checkbox Pin
Wendelius10-Sep-08 8:26
mentorWendelius10-Sep-08 8:26 
QuestionReport with vb-net Pin
zagari9-Sep-08 1:04
zagari9-Sep-08 1:04 
AnswerRe: Report with vb-net Pin
Dave Kreskowiak9-Sep-08 6:55
mveDave Kreskowiak9-Sep-08 6:55 
Questionsystem.data.datarowview as string Pin
Ebube9-Sep-08 0:56
Ebube9-Sep-08 0:56 
AnswerRe: system.data.datarowview as string Pin
Manas Bhardwaj9-Sep-08 1:35
professionalManas Bhardwaj9-Sep-08 1:35 
GeneralRe: system.data.datarowview as string Pin
Ebube9-Sep-08 3:37
Ebube9-Sep-08 3:37 
GeneralRe: system.data.datarowview as string Pin
Manas Bhardwaj9-Sep-08 3:52
professionalManas Bhardwaj9-Sep-08 3:52 
QuestionHow to invoke MQ series through classic ASP Pin
Member 26856239-Sep-08 0:05
Member 26856239-Sep-08 0:05 
QuestionHow we use INF-Tool for making setup Pin
Amit Battan Ror8-Sep-08 21:18
Amit Battan Ror8-Sep-08 21:18 
AnswerRe: How we use INF-Tool for making setup Pin
Manas Bhardwaj8-Sep-08 21:30
professionalManas Bhardwaj8-Sep-08 21:30 
Questiontype cast in vb.net Pin
rprateek8-Sep-08 17:51
rprateek8-Sep-08 17:51 
AnswerRe: type cast in vb.net Pin
Steven J Jowett8-Sep-08 18:18
Steven J Jowett8-Sep-08 18:18 
AnswerRe: type cast in vb.net Pin
rprateek8-Sep-08 18:28
rprateek8-Sep-08 18:28 
AnswerRe: type cast in vb.net Pin
Guffa8-Sep-08 21:16
Guffa8-Sep-08 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.