473,406 Members | 2,698 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,406 software developers and data experts.

Update value into access table by using vb as front-end

2
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
Oct 3 '07 #1
1 2416
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
Oct 4 '07 #2

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

Similar topics

5
by: jayson_13 | last post by:
Hi, I need to implement a counter and i face problem of locking so hope that u guys can help me. I try to do test like this : 1st connection SELECT * FROM nextkey WHERE tblname = 'PLCN'...
12
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
1
by: Nothing | last post by:
I have a field, Y, in table A that I need to update from table B, matching on comman field X in both tables. Table A has 10K+ records with field X in it (Field X multipul times). Table B has...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
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...

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.