[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..
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
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.
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
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.
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.
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
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?
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..."
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).
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..!! :)
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).
Re: [RESOLVED] Compiler error: method or datamember not found vb6
Swap
Glad you RESOLVED things
Spoo