rocky050371
asked on
Binding + Database Linking - 500 pts
I have asked a similar question to this before, however this time I will provide the full scenario.
I have a contact table which has all the usual fields plus PhoneNumber and PhoneDescription 1 -5
These fields are bound to a form, the reason for keeping them all within the same table was to provide easier binding. It allows the user to change each phone description and number very easily. I choose five as this will be the maximum it will ever be.
The problem I have is that I am still wondering whether the contacts phone numbers should go in another table, the problem is that while it is the correct way to link it, it causes significant coding to get it working.
Ideas anyone
I have a contact table which has all the usual fields plus PhoneNumber and PhoneDescription 1 -5
These fields are bound to a form, the reason for keeping them all within the same table was to provide easier binding. It allows the user to change each phone description and number very easily. I choose five as this will be the maximum it will ever be.
The problem I have is that I am still wondering whether the contacts phone numbers should go in another table, the problem is that while it is the correct way to link it, it causes significant coding to get it working.
Ideas anyone
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works like this
Me.cboTitles.DataBindings. Add("Text" , _currentcontact, "Title")
Me.txtForename.DataBinding s.Add("Tex t", _currentcontact, "FirstName")
Me.txtSurname.DataBindings .Add("Text ", _currentcontact, "LastName")
Me.cboSalutation.DataBindi ngs.Add("T ext", _currentcontact, "Salutation")
Me.cboDisplayAs.DataBindin gs.Add("Te xt", _currentcontact, "DisplayAs")
Me.txtAddress1.DataBinding s.Add("Tex t", _currentcontact, "Address1")
Me.txtAddress2.DataBinding s.Add("Tex t", _currentcontact, "Address2")
Me.txtAddress3.DataBinding s.Add("Tex t", _currentcontact, "Address3")
Me.txtAddress4.DataBinding s.Add("Tex t", _currentcontact, "Address4")
Me.txtAddress5.DataBinding s.Add("Tex t", _currentcontact, "Address5")
Me.txtPostcode.DataBinding s.Add("Tex t", _currentcontact, "Postcode")
Me.btnPhone1.DataBindings. Add("Text" , _currentcontact, "PhoneDescription1")
Me.txtPhone1.DataBindings. Add("Text" , _currentcontact, "PhoneNumber1")
Me.btnPhone2.DataBindings. Add("Text" , _currentcontact, "PhoneDescription2")
Me.txtPhone2.DataBindings. Add("Text" , _currentcontact, "PhoneNumber2")
Me.btnPhone3.DataBindings. Add("Text" , _currentcontact, "PhoneDescription3")
Me.txtPhone3.DataBindings. Add("Text" , _currentcontact, "PhoneNumber3")
Me.btnPhone4.DataBindings. Add("Text" , _currentcontact, "PhoneDescription4")
Me.txtPhone4.DataBindings. Add("Text" , _currentcontact, "PhoneNumber4")
Me.btnPhone5.DataBindings. Add("Text" , _currentcontact, "PhoneDescription5")
Me.txtPhone5.DataBindings. Add("Text" , _currentcontact, "PhoneNumber5")
Me.txtEmail.DataBindings.A dd("Text", _currentcontact, "Email")
Me.chkPrimaryContact.DataB indings.Ad d("Checked ", _currentcontact, "PrimaryContact")
Me.cboTitles.DataBindings.
Me.txtForename.DataBinding
Me.txtSurname.DataBindings
Me.cboSalutation.DataBindi
Me.cboDisplayAs.DataBindin
Me.txtAddress1.DataBinding
Me.txtAddress2.DataBinding
Me.txtAddress3.DataBinding
Me.txtAddress4.DataBinding
Me.txtAddress5.DataBinding
Me.txtPostcode.DataBinding
Me.btnPhone1.DataBindings.
Me.txtPhone1.DataBindings.
Me.btnPhone2.DataBindings.
Me.txtPhone2.DataBindings.
Me.btnPhone3.DataBindings.
Me.txtPhone3.DataBindings.
Me.btnPhone4.DataBindings.
Me.txtPhone4.DataBindings.
Me.btnPhone5.DataBindings.
Me.txtPhone5.DataBindings.
Me.txtEmail.DataBindings.A
Me.chkPrimaryContact.DataB
ASKER