Calling a function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maverick
    New Member
    • Sep 2006
    • 5

    #1

    Calling a function

    I'm trying to call on a function I created as follows. The stored functions is saved as :

    Public Function GetCaps(masterk ey As String, id As String)
    ---All the code
    End Function

    I am calling the function from a form as follows:

    Call GetCaps(Me.Text 3, Me.Text5)

    variable masterkey is stored in the forms' Text3 and same for id.

    When I click the button, I get the following error:
    "Compile Error - Expected Variable or procedure, not module"

    Can someone help me..
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi,

    Try:
    Code:
    Dim i
    i = GetCaps(Me.Text3, Me.Text5)
    :)

    Comment

    Working...