with VB6, how do i open a form assigned to a user in a table

Posted on 2006-03-21
Last Modified: 2010-04-17
Dear People,

I have a SQL table called Usrrights. I have the columns ... T_Username, T_MenuName,T_FormName

When I have the user logged in, the menu pertaining to the user is shown with a tree menu. Now I
want to open the form which has the form name in the column T_FormName

eg. T_Username  = 'Jack', T_MenuName = 'Employee Master' and the form name is 'EmpMast'

Once i populate the tree menu i can see Employee Master. Now what i need is, once i select Employee Master from the
tree menu or button, i need to open the Form ' Empmast ' How do i do this. Pl help.

Question by:Gururagguru
    LVL 6

    Accepted Solution

    If you want to open a form by it's name, you can use the builtin Forms collection. Say you have a variable of type String called formName which stores say "frmToOpen" -- and your project contains a form called "frmToOpen". You can then use:
    to basically bring up frmToOpen -- so it would be equivalent to calling frmToOpen.Show (when the variable formName = "frmToOpen" obviously).
    Is this what you are looking for?

    Author Comment

    i found the answer. thanks a many

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    This is about my first experience with programming Arduino.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now