|
-
Nov 7th, 2011, 01:40 PM
#1
Thread Starter
Junior Member
[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..
-
Nov 7th, 2011, 02:31 PM
#2
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
-
Nov 7th, 2011, 07:59 PM
#3
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.
-
Nov 7th, 2011, 08:42 PM
#4
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
-
Nov 8th, 2011, 11:15 AM
#5
Thread Starter
Junior Member
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.
-
Nov 8th, 2011, 11:25 AM
#6
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.
-
Nov 8th, 2011, 11:30 AM
#7
Thread Starter
Junior Member
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
-
Nov 8th, 2011, 11:33 AM
#8
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?
-
Nov 8th, 2011, 11:38 AM
#9
Thread Starter
Junior Member
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..."
-
Nov 8th, 2011, 12:03 PM
#10
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).
-
Nov 8th, 2011, 12:24 PM
#11
Thread Starter
Junior Member
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.
-
Nov 8th, 2011, 12:46 PM
#12
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).
-
Nov 8th, 2011, 03:38 PM
#13
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|