Form variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Form variable

    In my form I have several buttons that use the same string value. So I would
    like to assign a constant that is global for the form. What's the best way
    to do this? In which section do I place this constant code?
    Thanks,
    john


  • Neil

    #2
    Re: Form variable

    Declare the constant at the top of the form, in the declarations section.
    That will make it a module-level constant. I usually prefix my module level
    variables and constants with an "m" to differentiate them from local ones.
    Thus, I would do something like:

    Const mconMyString = "Some string"

    Neil

    "John" <jo@hn.comwro te in message news:f4nubc$vgp $1@textnews.wan adoo.nl...
    In my form I have several buttons that use the same string value. So I
    would like to assign a constant that is global for the form. What's the
    best way to do this? In which section do I place this constant code?
    Thanks,
    john
    >

    Comment

    • John

      #3
      Re: Form variable

      Thank you.
      john

      "Neil" <nospam@nospam. netschreef in bericht
      news:RgLbi.1369 6$2v1.2606@news svr14.news.prod igy.net...
      Declare the constant at the top of the form, in the declarations section.
      That will make it a module-level constant. I usually prefix my module
      level variables and constants with an "m" to differentiate them from local
      ones. Thus, I would do something like:
      >
      Const mconMyString = "Some string"
      >
      Neil
      >
      "John" <jo@hn.comwro te in message
      news:f4nubc$vgp $1@textnews.wan adoo.nl...
      >In my form I have several buttons that use the same string value. So I
      >would like to assign a constant that is global for the form. What's the
      >best way to do this? In which section do I place this constant code?
      >Thanks,
      >john
      >>
      >
      >

      Comment

      Working...