Hi there
I am totally new in VBA, just trying to learning during my free time with help you forum, I have a very basic question
I am trying to use Public Function and getting Runtime Error upon execution
Here's is my simple code
Public Function CCname()
Dim cname As String
cname = [Forms]![form1]![me.txtfield1]
End Function
To call i am using "Call CCname"
Upon execution i am getting following Error
Run-time error '2465':
MS Access can't find the field "me.txtfield1" referrer in your expression
And if simply remove "me" from txtfield1 nothing is happen even no error
Any help would be appreciate
I am totally new in VBA, just trying to learning during my free time with help you forum, I have a very basic question
I am trying to use Public Function and getting Runtime Error upon execution
Here's is my simple code
Public Function CCname()
Dim cname As String
cname = [Forms]![form1]![me.txtfield1]
End Function
To call i am using "Call CCname"
Upon execution i am getting following Error
Run-time error '2465':
MS Access can't find the field "me.txtfield1" referrer in your expression
And if simply remove "me" from txtfield1 nothing is happen even no error
Any help would be appreciate