Hi,
I am using MS-Access as back end table for VB application. In the access table there are four columns as sno,productioncount ,percentage and totalcount. Here in prodcution count filed we have numbers like 10,20,30,5,15 etc. Here i want to update into Percentage column from front-end. Here I want to update this column as val(text1.text)*Productioncount=result
Please adives in this regards,
TQ
Hi!! this is my first post so ... you know. this is the script i`ve used for something like that.. im only missing if i want to send Radio Buttons. please help me if u know, or anyone! =)
it will write to the column, specified by Name!
Imports System.Data.OleDb
Imports System.Data.DataRow
Public Class Form1
Private MiConexion As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\bd1.mdb")
Private MiAdaptador As New OleDbDataAdapter("SELECT * FROM Nombres", MiConexion)
Private MiDataSet As New DataSet()
Private MiEnlazador As New BindingSource
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If (e.KeyChar = Chr(Keys.Enter)) And (Me.TextBox1.Text.Length > 0) Then
Dim nombre As DataRow
nombre = MiDataSet.Tables(0).NewRow()
nombre("Nombre") = TextBox1.Text
nombre("Telefono") = TextBox2.Text
MiDataSet.Tables(0).Rows.Add(nombre)
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.ComboBox1.SelectedIndex = Me.ComboBox1.Items.Count - 1
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim commandbuilder As New OleDb.OleDbCommandBuilder(Me.MiAdaptador)
MiConexion.Open()
MiAdaptador.Fill(MiDataSet)
MiEnlazador.DataSource = MiDataSet.Tables(0)
Me.ComboBox1.DataSource = MiEnlazador
Me.ComboBox1.DisplayMember = "Nombre"
Me.ComboBox1.ValueMember = "Id"
Me.TextBox1.Select()
End Sub
Private Sub Guardar(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.MiAdaptador.Update(CType(Me.MiEnlazador.DataSou rce, DataTable))
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class