Results 1 to 4 of 4

Thread: [RESOLVED] Data Control Runtime Error '3426'

  1. #1

    Thread Starter
    Lively Member Hojo's Avatar
    Join Date
    Jul 2005
    Location
    Brisbane, Australia
    Posts
    119

    Resolved [RESOLVED] Data Control Runtime Error '3426'

    Hello All

    I am trying to setup a small database program for personal use, as i have done many times before. But for some reason i am having trouble getting this one to work.

    I simply have a Data control filling in data bound text or combo boxes with the current selections data. But when i try to move to another selected record by using the

    VB Code:
    1. Dim Item As String
    2.    
    3.     Item = dbcItemNumber.Text
    4.     Data1.Recordset.FindFirst "ItemNumber = '" & Item & "'"

    i get an error...

    Runtime Error '3426'
    This action was canceled by an associated object.

    This is frustraing as this is the same code i've used for other programs and they worked and are still working. Also if i get rid of the variable Item and just have

    VB Code:
    1. Data1.Recordset.FindFirst "ItemNumber = 'X001'"

    It works.

    Any ideas anyone?
    Last edited by Hojo; May 30th, 2006 at 06:19 PM.
    Despite body and mind, my youth will never die!

    Everytime I learn something new it pushes some old stuff out of my brain!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Data Control Runtime Error '3426'

    That's strange.. try changing the variable name from Item to something different (as Item is a reserved word, it may be causing issues).

    If that doesn't help, what is in dbcItemNumber.Text when you run this?

  3. #3
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Re: Data Control Runtime Error '3426'

    yes this is because of variable name u need to change it to some other name .... change it with Item1 or something like that

  4. #4

    Thread Starter
    Lively Member Hojo's Avatar
    Join Date
    Jul 2005
    Location
    Brisbane, Australia
    Posts
    119

    Re: Data Control Runtime Error '3426'

    Hi,

    I found out the solution to this last night. The dbcItemNumber was a data bound combobox which was used to display the items in a record source and then change the selected record to the one selected in the combobox. but when ever i changed the cobo box it must have got confused

    what i had to do was remove the data binding from the . text property but keep the data binding to the list property so that i still had a populated list of all the recordset items but it didn't get confused.

    thanks for your efforts though.

    cheers
    Despite body and mind, my youth will never die!

    Everytime I learn something new it pushes some old stuff out of my brain!

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