officemanager2
Technical User
Hello: New to VB.net and I was a best below average on VBA but still trying. So I've created a form in VB.Net which has the following on it:
I understood I could input data to fields in an access database with the following in the properties menu:
Data-DataBindings-Text-UnitsBindingSource-Type
But when I hit the complete button there is a conflict with the date fields and nothing transfers over. When I use the debug no errors come up so I'm not sure what I'm missing here?
Perhaps it is something else entirely in the way I've done this code but as it stands I'm pretty much stuck.
thanks
Code:
Public Class newclient
Private Sub ComNewClie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComNewClie.Click
Dim UnitType As String
Dim CertNumber As String
Dim NumOfUnits As Integer
Dim HolderName As String
Dim HolderAddress As String
Dim InputPrice As Integer
Dim FuturePrice As Integer
Dim DatePriceChg As Date
Dim ExpiryDate As Date
Dim ExpiryZone As String
Dim CreationDate As Date
Dim FinName As String
UnitType = Val(txtunittype.Text)
CertNumber = Val(txtCertNum.Text)
NumOfUnits = Val(txtNumUnits.Text)
HolderName = Val(txtHolderName.Text)
HolderAddress = Val(txtHolderAddress.Text)
InputPrice = Val(txtInPutPrice.Text)
FuturePrice = Val(txtFuturePrice.Text)
DatePriceChg = Date.FromOADate(txtDatePriceChg.Text)
ExpiryDate = Date.FromOADate(txtExpirDate.Text)
ExpiryZone = Val(txtExpirZone.Text)
CreationDate = Date.FromOADate(txtDateCreated.Text)
FinName = Val(txtFinName.Text)
End Sub
Private Sub newclient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'SEGO_UnitsDataSet.Units' table. You can move, or remove it, as needed.
Me.UnitsTableAdapter.Fill(Me.SEGO_UnitsDataSet.Units)
End Sub
End Class
I understood I could input data to fields in an access database with the following in the properties menu:
Data-DataBindings-Text-UnitsBindingSource-Type
But when I hit the complete button there is a conflict with the date fields and nothing transfers over. When I use the debug no errors come up so I'm not sure what I'm missing here?
Perhaps it is something else entirely in the way I've done this code but as it stands I'm pretty much stuck.
thanks