Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Binding

Status
Not open for further replies.

officemanager2

Technical User
Oct 11, 2007
116
CA
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:

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

 

there is a conflict with the date fields

Are you getting a specific error message(s)? Posting them could help determine the issue.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top