Compile error
-
Hello, I'm trying to compile a vb6 application I've made but I keep getting this error below
Compile Error in File 'D:\TAT\VB6\apps\go bingo\Connection.bas', Line 121 : Sub or Function not defined
Line 121 consists of this block of code...
Function addrec(myform As Form, mydata As adodc)
On Error Resume Next
mydata.Recordset.AddNew
mycmd = cmds(myform, False)
addflag = True
End Function...line 21 is
mydata.Recordset.AddNew
. I've tried to comment-out the code but the error keeps persisting. How could I compile the project properly? Many thanks for your replies. :-DAim small, miss small
-
Hello, I'm trying to compile a vb6 application I've made but I keep getting this error below
Compile Error in File 'D:\TAT\VB6\apps\go bingo\Connection.bas', Line 121 : Sub or Function not defined
Line 121 consists of this block of code...
Function addrec(myform As Form, mydata As adodc)
On Error Resume Next
mydata.Recordset.AddNew
mycmd = cmds(myform, False)
addflag = True
End Function...line 21 is
mydata.Recordset.AddNew
. I've tried to comment-out the code but the error keeps persisting. How could I compile the project properly? Many thanks for your replies. :-DAim small, miss small
You defined a function but did not supply a return value type. It should be:
Function addrec(myform As Form, mydata As adodc) As someType
If you're not returning a value to the caller, change
Function
toSub
.A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You defined a function but did not supply a return value type. It should be:
Function addrec(myform As Form, mydata As adodc) As someType
If you're not returning a value to the caller, change
Function
toSub
.A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008