Pass value to scriptlet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ze colmeia
    New Member
    • Oct 2006
    • 8

    Pass value to scriptlet

    Hi all...

    i'm having trouble trying to pass a field value from a Data Access Page to a Scriptlet.

    Om my DAP i have:
    Code:
    Function returnId()
    Dim pId
    pId = formName.Id.value
    returnId = pId
    End Function
    And on my scriptlet i have something like this:
    Code:
    Function public_DropMenu()
    Dim rId
    rId = parent.returnId()
    
    sqlStr = "SELECT * FROM tbl WHERE Id=" & rId
    
    ....
    End Function
    But parent.returnId () always returns an empty string... Is there any other way to do this?

    Thanks in advance.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    I don't know anything about scriptlets, but your ReturnId function has pId = formName.Id.Val ue - I would guess this needs to be pId = Me.Id .Value - or, alternatively just pId = Id.

    If not, sorry I can't help.

    Comment

    • ze colmeia
      New Member
      • Oct 2006
      • 8

      #3
      i took your advice and put pId = formName.Id and the return value pId.value and it worked fine.

      Thanks a lot!

      Comment

      Working...