|
-
Feb 16th, 2006, 06:31 AM
#1
Thread Starter
Hyperactive Member
Data Binding Collection Error
Hi All,
I have encounter a data binding error as shown on the picture below. This error is only triggered when I click on a New button and trying to clear away the existing datas in the form as shown in the VB coding. Pls offer your generous advice. Thanks.
Code:
Private Sub clear()
On Error Resume Next
TxtFName.Text = ""
txtLName.Text = ""
TxtAdd.Text = ""
txtpostalCode.Text = ""
Txttel.Text = ""
txtHP.Text = ""
TxtEmail.Text = ""
txtCarModel.Text = ""
txtClassType.Text = ""
ListRates.Text = ""
End Sub
Private Sub cmdNew_Click()
inv.AddNew
Call clear
txt_RentDay.Text = Format(Now, "dd/mm/yyyy")
txt_RetDay.Enabled = True
txt_RetDay.SetFocus
Cbo_Cust.Enabled = True
Cbo_Reg.Enabled = True
cmdFirst.Enabled = False
cmdBack.Enabled = False
cmdNext.Enabled = False
cmdLast.Enabled = False
cmdNew.Enabled = False
cmdedit.Enabled = False
CmdAdd.Enabled = True
cmdDelete.Enabled = False
cmdCancel.Enabled = True
cmdExit.Enabled = True
End Sub
-
Feb 16th, 2006, 09:22 AM
#2
Re: Data Binding Collection Error
What line in the New button generates the error?
-
Feb 16th, 2006, 09:27 AM
#3
Thread Starter
Hyperactive Member
Re: Data Binding Collection Error
There is no error shown on the line.
Whenever I input any data into the form, it will just prompt me that error message.
The problem only arise i think it is because of the above coding added.
The purpose of the coding is actually to clear away the previous data left in the boxes whenever an add button is clicked. probably the way i wrote the codes isn't that correct.
-
Feb 16th, 2006, 09:28 AM
#4
Hyperactive Member
Re: Data Binding Collection Error
i also encounter that error and i do not now how to locate it, i think it happen in the form controls not in the code .... i just replace the control and rename it
-
Feb 16th, 2006, 09:31 AM
#5
Thread Starter
Hyperactive Member
Re: Data Binding Collection Error
Which part of form control ru referring to?
May you give an example or scenario?
-
Feb 16th, 2006, 09:43 AM
#6
Hyperactive Member
Re: Data Binding Collection Error
the textbox bound to a control.... find the textboxt that has a datfield custfname... replace the textbox and rename it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|