Results 1 to 2 of 2

Thread: global variables

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2008
    Posts
    1

    global variables

    I have a form that when the user logs in a text box call "AccessLevel" is autofilled with the users access level, this box is uneditable by the user, what i want to do is take the text from the accesslevel box and use it on the main menu form that opens when the user logs in. i can't work out how this is done, i know i have to assign a global variable but am unsure of how to go about this.
    any help will be most greatful

    Chris

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: global variables

    Welcome to the forums.

    Add a module to your VBA project.

    In the module, in the declarations section, put something like:

    Public strAccessLevel As String

    When the form opens, assign the contents of your access level textbox to this string, and because it is public, it can be used through the entire course of your project.

Posting Permissions

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



Click Here to Expand Forum to Full Width