Results 1 to 6 of 6

Thread: Data Binding Collection Error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    365

    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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Data Binding Collection Error

    What line in the New button generates the error?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    365

    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.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    365

    Re: Data Binding Collection Error

    Which part of form control ru referring to?

    May you give an example or scenario?

  6. #6
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    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
  •  



Click Here to Expand Forum to Full Width