Get values from Access table without displaying them on form, calculate the values and display result on form.
Posted on 2004-04-23
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sales As Double
Dim rate As Double
Dim commission As Double
sales = Me.OleDbDataAdapter1.SelectCommand.Parameters("sales").Value
rate = Me.OleDbDataAdapter1.SelectCommand.Parameters("rate").Value
commission = sales * rate
Me.TextBox1.text = commission
The code is as above and it's not working. Basically it's very simple. I just want to get some numeric values from an Access table, calculate them, and display the result on a form. Please note, when retrieving the values from table, I don't need to display them on form. So I don't need data binding, right?