Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Unanswered: Local, Global variables in Access

    Hi,

    I'm relatively new to Access and wonder if it's possible to define global or local variables in Access and populate these variables on the screen?

    Thanks,

  2. #2
    Join Date
    Mar 2004
    Location
    Slovenia
    Posts
    56

    Variables

    Public variable:

    1)create new module
    2)and just type in:
    Public Myvariable as integer
    3)...and then you can call from forms moduls the variable

    private sub callvariable()
    myvariable = 777
    msgbox myvariable
    end sub
    Back to the basics...

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    You can define a variable to be Global also for a class Module (The code where you put on your form or report).

    Just write in the beggining of your ClassModule
    Dim yourVariable

    This variable could be called in any function or sub in your Form or Class Module

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •