OpenArgs format question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abhean
    New Member
    • Mar 2019
    • 32

    OpenArgs format question

    I am using openargs to transfer 2 variables to a form. However I am missing something when I sent the request through.
    The second variable goes through without problem, but the first one is not. The system is seeing the Var name and sending that. Im sure it is just a formatting problem.

    Code in Parent I Need it to pull the variable Accessionz and ClientNumz. The Bar is the separator.

    Code:
    DoCmd.OpenForm "FollowUpFrm", , , , , , "Accessionz|" & ClientNumz
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    Abhean.
    You're passing the name of the variable as a string. Why would you expect anything other than that name to be received by the Form. If you pass the value instead then you'll get the value that I assume you want.

    Comment

    • Abhean
      New Member
      • Mar 2019
      • 32

      #3
      and I hate parenthesis!
      Move one and it works.
      Code:
      DoCmd.OpenForm "FollowUpFrm", , , , , , Accessionz & "|" & ClientNumz

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        I'm not sure I follow the bit about parentheses. There is none in your code. However, you have moved the word Accessionz such that it is no longer within the quotes ("), just as I advised, so I'm glad to hear it works. Within quotes means it is a literal text string whereas outside of them means it's used to point to some object or variable as a reference. It certainly should work like that.
        Last edited by NeoPa; Jul 1 '20, 11:49 PM. Reason: Typo on Parentheses.

        Comment

        Working...