I can't see anything wrong from quickly browsing your code. Which line
throws the exception? In addition, do you have the database schema?
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Me" <(E-Mail Removed)> wrote in message
news:B13DFB37-4E0A-46A6-A581-(E-Mail Removed)...
> Hi,
>
> The error i now recieve is:
>
> Cant bind to property or coloumn Title on datacource. Parameter name:
datamember
>
> this message appears when i click the OK button on Form2. The message
does not end the application but my binding code does not run.
> Here is my binding code:
>
> Try
> cn.Open()
>
> da.Fill(Guest.dsGuest, "ClientDet")
>
> txtTitle.DataBindings.Clear()
> txtForename.DataBindings.Clear()
> txtSurname.DataBindings.Clear()
> txtaddress.DataBindings.Clear()
> txtPostcode.DataBindings.Clear()
> txtorganisation.DataBindings.Clear()
> txtPhoneNo.DataBindings.Clear()
>
> 'display the records in the controls
> Guest.dsGuest.Tables("ClientDet").Select()
> Me.txtTitle.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "Title"))
> Me.txtForename.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "Forename"))
> Me.txtSurname.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "SurName"))
> Me.txtaddress.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "Address"))
> Me.txtPostcode.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "Postcode"))
> Me.txtorganisation.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "OrgName"))
> Me.txtPhoneNo.DataBindings.Add(New Binding("Text",
Guest.dsGuest.Tables("ClientDet"), "PhoneNo"))
>
> 'place the values from the controls into the global varibles
> TBTitle = txtTitle
> TBPubFName = txtForename
> TBPubLName = txtSurname
> TBPubAddr = txtaddress
> TBPubPCode = txtPostcode
> TBPubPhoneNo = txtPhoneNo
> TBPubOrg = txtorganisation
> LabelExClientID = lblExClientID
>
> Me.Close()
>
> i declare the variables at the top of the form like so:
> Public Shared TBTitle As TextBox
> Public Shared TBPubFName As TextBox
> Public Shared TBPubLName As TextBox
> Public Shared TBPubAddr As TextBox
> Public Shared TBPubPCode As TextBox
> Public Shared TBPubPhoneNo As TextBox
> Public Shared TBPubOrg As TextBox
>
>
> can anyone plz help