We help IT Professionals succeed at work.

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

Gururagguru asked
Medium Priority
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.

Watch Question

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?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


i found the answer. thanks a many
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.