Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a different form of exe conditionally

Status
Not open for further replies.

rohitpabby

Programmer
Aug 13, 2001
27
IN
Hi All!

e.g. I have got two forms in my exe, one is for employee info. and other is for company info. I want that depending on the ID the specific for should start and the info. for the ID to be fetched automatically. How to do this if we have the ID and want to run exe from a DOS promt? Please help...

Thanks.
 
Hi,

If you want to type the ID after the exe name (like MyProg MyID), you can get the ID using the command$:

--------------------------------------------------
If lcase$(command$)="employee" then
load FrmEmployee
elseif lcase$(command$)="company"
load FrmCompay
else
msgbox("you must provide an input.")
end
end if
--------------------------------------------------

You could also get the login name (faq222-429) and have a list/databse that tells you which users should see which form....

Sunaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top