Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2006-03-21
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.

Question by:Gururagguru

Accepted Solution

liviutudor earned 1000 total points
ID: 16246989
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

ID: 16247183
i found the answer. thanks a many

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

577 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