Click here to Skip to main content
15,899,474 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: help me with this... urgent... code below... Pin
Capt_Thanas2-Jun-06 4:37
Capt_Thanas2-Jun-06 4:37 
GeneralRe: help me with this... urgent... code below... Pin
Guffa2-Jun-06 6:25
Guffa2-Jun-06 6:25 
QuestionBrowser Pin
Socheat.Net1-Jun-06 21:33
Socheat.Net1-Jun-06 21:33 
QuestionHow to count an Overtime Pin
Swiss Mantoro1-Jun-06 21:25
Swiss Mantoro1-Jun-06 21:25 
AnswerRe: How to count an Overtime Pin
Guffa1-Jun-06 21:35
Guffa1-Jun-06 21:35 
GeneralRe: How to count an Overtime Pin
Swiss Mantoro2-Jun-06 18:05
Swiss Mantoro2-Jun-06 18:05 
AnswerRe: How to count an Overtime Pin
Guffa2-Jun-06 23:25
Guffa2-Jun-06 23:25 
Questionhelp me please in this checkedlistbox.. [modified] Pin
nellyvb.net1-Jun-06 20:28
nellyvb.net1-Jun-06 20:28 
Hi every body,

I'm workin on a vb.net 2003 ,and on an Access db.
I've the table :"CarParts" has these columns(PartNo,PartName,Price)
and I've a question I hope someone could help me to solve it.
I've a checkedlistbox,and I binded it to (PartName)column .
when I check an item I want it's name to be added to a textbox to save in a specivic column,and it's price to be added in another txtbox just to get the sum of all the checked items.then I would be able to save the whole selected items written in this textbox to save them in another column and I will be abel to save the sum of all the selected items in another column .
I did it by usuing the checkbox tool and it succeeded,according to the next code where i binded the Price column to one Label just to help me doing the sum,this label work even if i updated the prices:
if checkbox1.checked the <br />
bmb.position=0 <br />
sum += Val(Label 1 .text) <br />
textbox1.text & = " the 1st car part name" <br />
end if <br />
if checkbox2.checked the <br />
bmb.position=1<br />
sum += Val(Label 1 .text) <br />
textbox1.text & = " the 2nd car part name" <br />
end if <br />
.<br />
.<br />
.<br />
etc..<br />

Here is my CheckedListBox code it's just loading the (PartName)column data ,what Should I add to make it do the checklistbox job, pleeeeease help me:

Code:


Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click  <br />
 Dim strcon As String   <br />
Try   	<br />
strcon = " provider=microsoft.jet.oledb.4.0;datasource=Cars.mdb "   	Dim con As New OleDbConnection(strcon)   	con.Open()    <br />
 	Dim adapter As New OleDbDataAdapter("select * from CarParts", con)  <br />
 Dim cn As OleDbConnection = New OleDbConnection   	Dim dset1 As New DataSet   <br />
    Dim dt As New DataTableadapter.Fill(dt)   	CheckedListBox1.DataSource = dt   	CheckedListBox1.DisplayMember = "PartName" <br />
      Catch ex As Exception   <br />
	MessageBox.Show(ex.Message)  <br />
  <br />
 End Try 	<br />
End Sub


-- modified at 2:28 Friday 2nd June, 2006
QuestionPlease help explain this code... Pin
JackIsMe7771-Jun-06 20:07
JackIsMe7771-Jun-06 20:07 
AnswerRe: Please help explain this code... Pin
shreekar1-Jun-06 22:26
shreekar1-Jun-06 22:26 
GeneralRe: Please help explain this code... Pin
JackIsMe7773-Jun-06 4:45
JackIsMe7773-Jun-06 4:45 
GeneralRe: Please help explain this code... Pin
shreekar4-Jun-06 20:07
shreekar4-Jun-06 20:07 
QuestionExternal Application Object Listener [modified] Pin
Gabe04631-Jun-06 19:16
Gabe04631-Jun-06 19:16 
QuestionHow to call a module? [modified] Pin
zenithmaximus1-Jun-06 17:02
zenithmaximus1-Jun-06 17:02 
AnswerRe: How to call a module? [modified] Pin
shreekar1-Jun-06 22:28
shreekar1-Jun-06 22:28 
Questionsystem.string[] Problem Pin
mrodriguezc1-Jun-06 12:05
mrodriguezc1-Jun-06 12:05 
QuestionCheck for admin rights in deploy/setup/install Pin
Kschuler1-Jun-06 8:53
Kschuler1-Jun-06 8:53 
AnswerRe: Check for admin rights in deploy/setup/install Pin
Mekong River1-Jun-06 21:21
Mekong River1-Jun-06 21:21 
AnswerRe: Check for admin rights in deploy/setup/install Pin
Mekong River3-Jun-06 6:23
Mekong River3-Jun-06 6:23 
QuestionRe: Check for admin rights in deploy/setup/install Pin
Kschuler5-Jun-06 2:57
Kschuler5-Jun-06 2:57 
AnswerRe: Check for admin rights in deploy/setup/install Pin
Mekong River6-Jun-06 6:49
Mekong River6-Jun-06 6:49 
QuestionSelect Top 1 Pin
boukaka1-Jun-06 8:36
boukaka1-Jun-06 8:36 
AnswerRe: Select Top 1 Pin
Kschuler1-Jun-06 8:48
Kschuler1-Jun-06 8:48 
AnswerRe: Select Top 1 Pin
boukaka1-Jun-06 8:50
boukaka1-Jun-06 8:50 
AnswerRe: Select Top 1 Pin
Leeland1-Jun-06 10:29
Leeland1-Jun-06 10:29 

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.