Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4090664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:16:02+00:00 2026-05-20T19:16:02+00:00

Hi all i want to pass the variable that has been declared in Form

  • 0

Hi all i want to pass the variable that has been declared in Form 1 to say FormN. Say this is my idea, there are two users anonymous user and authenticated user, who log into the ebook management system and obviously only authenticated user(AU) can edit and manipulate the database. Now i want to pass the variable say Flag , and will assign the flag value as 0 for anonymous user and 1 for AU.
My doubt is in form1(where i’m going to set the flag value). And how to pass this value to say Form3 so that depends upon the Flag i will set enable and disable the add/delete.. buttons for anonymous and Au user respectively. How to do this in VB6?

Note that the add/delete button add and delete the table in the database.

This is what i need:

In form1

Private Sub XXX_Click()
{
     `have to initialize the flag depending on user's log-in
}

in form 2, where i have to check the flag function, so that i can disable the buttons (according to user). My doubt is where to place these functions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:16:03+00:00Added an answer on May 20, 2026 at 7:16 pm

    You might use this way:

    In Form1 you declare a public variable Flag and optionally the Form_Initialize() method:

    Public Flag as Integer
    Sub Form_Initialize()
       ' here you set your default value for this var espesially if it is not 0
       Flag = 0
    End Sub
    

    In Form3 you also declare a public variable Flag:

    Public Flag as Integer
    Sub Form_Initialize()
       ' here you set your default value for this var espesially if it is not 0
       Flag = 0
    End Sub
    

    then in Form1 somewhere in your code you do this:

    Sub Your_Function()
       ' ...
       Dim f as Form3
       Set f = new Form3
       f.Flag = Me.Flag
       f.show ' or f.show vbModal
       ' ...
    End Sub
    

    and then in Form3 Form_Load() you will have the var Flag already set to proper value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do something like this: c:\data\> python myscript.py *.csv and pass all
The Table - Query has 2 columns (functionId, depFunctionId) I want all values that
Suppose you have a trigger on MY_CUSTOMER_TABLE and that it has a variable declared
All I want is to update an ListViewItem's text whithout seeing any flickering. This
Say I have an interface IFoo and I want all subclasses of IFoo to
Here's a simple (hopefully) L10N question: Do all locales want this format: Sunday, Nov
I want to have a function in a different module, that when called, has
I want to use a temp directory that will be unique to this build.
As the title says, is there another way to pass a variable from "current"
All I want is to be able to change the color of a bullet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.