Results 1 to 13 of 13

Thread: [RESOLVED] Compiler error: method or datamember not found vb6

  1. #1

    Thread Starter
    Junior Member swapnil.k's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    17

    Resolved [RESOLVED] Compiler error: method or datamember not found vb6

    Private Sub cmdNewRecord_Click(Index As Integer)
    datIDU.Recordset.AddNew
    cmdSaveRecord.Enabled = True
    cmdMoveFirst.Enabled = False
    cmdMoveLast.Enabled = False
    cmdMoveNext.Enabled = False
    cmdMovePrevious.Enabled = False

    End Sub


    i am getting the above mentioned error all the lines. I am trying to add new entry in the table by entering all the relevant data and clicking the add button . this add button will enable the save button.

    but, i suppose, the command " cmdSaveRecord.Enabled = True" is not getting recognized..

  2. #2
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Compiler error: method or datamember not found vb6

    Swap

    OK, let's take it 1 line at a time, beginning with
    datIDU.Recordset.AddNew

    Some questions (btw, similar to LaVolpe's on the other thread)
    • On what form is datIDU declared?
    • On what form does Private Sub cmdNewRecord_Click(Index As Integer) reside?

    Spoo

  3. #3
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: Compiler error: method or datamember not found vb6

    I'm going to guess that you have control arrays here, though that may not have been your intention. If you have only one command button with each of those names, clear the index value in the properties window for these controls.

  4. #4
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Compiler error: method or datamember not found vb6

    Swap

    Taking Logophobic's thought one step further...

    is cmdNewRecord ..
    • a control array?
    • a solo button?

    If the latter, then perhaps just removing the
    Index As Integer will do the trick.

    Spoo

  5. #5

    Thread Starter
    Junior Member swapnil.k's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    17

    Re: Compiler error: method or datamember not found vb6

    thank u guys for helping me out..


    cmdNewRecord is one of the solo buttons present on the Search form. also datIDU is present on the same Search form.

    I tried removing Index as Integer..however, it gave me below error:

    Compile error: Procedure declaration doesnot match description of event or procedure having same name.

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

    Re: Compiler error: method or datamember not found vb6

    In that case you need to also go to the Properties window for that control, and delete the value from the Index property.

  7. #7

    Thread Starter
    Junior Member swapnil.k's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    17

    Unhappy Re: Compiler error: method or datamember not found vb6

    Spoo & si,

    thanks.. but i tried clearing the index value in the properties window without any luck

    still gettign the "Compiler error: method or datamember not found vb6" error

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

    Re: Compiler error: method or datamember not found vb6

    Do you mean you couldn't remove the value? or something else?

    Assuming you could remove it, what actually happened?

  9. #9

    Thread Starter
    Junior Member swapnil.k's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    17

    Re: Compiler error: method or datamember not found vb6

    i could remove the index value from properties window and after the form loaded, clicked on cmdNewRecord button and got the error of "method or member..."

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

    Re: Compiler error: method or datamember not found vb6

    On which line?

    Assuming it is on "cmdSaveRecord.Enabled = True", check if cmdSaveRecord has an Index value (if so, clear it).

  11. #11

    Thread Starter
    Junior Member swapnil.k's Avatar
    Join Date
    Nov 2011
    Location
    India
    Posts
    17

    Re: Compiler error: method or datamember not found vb6

    problem solved...

    thanks si, spoo & logo.. really helped..

    the problem was it the other cmdbuttons... thanks a ton..

    i am working on a proj will post if any error occurs henceforth..!!
    Last edited by swapnil.k; Nov 8th, 2011 at 12:27 PM.

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

    Re: Compiler error: method or datamember not found vb6

    We're happy to help.


    As you now have this issue sorted out, could you please do us a little favour, and mark the thread as Resolved?
    (this saves time reading for those of us who like to answer questions, and also helps those who search to find answers)

    You can do it by clicking on "Thread tools" just above the first post in this thread, then "Mark thread resolved". (like various other features of this site, you need JavaScript enabled in your browser for this to work).

  13. #13
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: [RESOLVED] Compiler error: method or datamember not found vb6

    Swap

    Glad you RESOLVED things

    Spoo

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