Click to See Complete Forum and Search --> : Form


vision21
October 21st, 2000, 05:42 AM
Hi,

I create a program that load Function No, Function Description and Form Name into a MxFlexgrid.

I wish to activate according when the Function No is selected by refering to the Form Name store in the MsFlexGrid.

I can get it work, can someone please help.

Thanks

Zhang YongZhi

huihaisang
October 22nd, 2000, 07:19 PM
Hi:
I think there are several ways to solve it. First, you can try "Find" search from database.
Second, using "Select Function NO from XXXX where Form Name = MxFlexgrid.text". Third, you can compare with Form Name column to matches your need(Form Name) and then you will know the mxFlexgrid.row. You can set mxFlexgrid.col=Function No columns number. Finally, you can get your Function NO.

shawn

vision21
October 22nd, 2000, 09:30 PM
Hi,

Thanks for the reply.

What I need is to activate the selected Function No. by the FORM Name attached to it, this way I can change the layout of the function in the INI file without having to change the VB program.

There is a LOADPICTURE(picfilename), is there a LOADFORM(formname) function ?

Thank you.

Zhong YongZhi

huihaisang
October 22nd, 2000, 10:42 PM
Hi:
There is a load form_name. This function will cause to open this form. The INI file is supoosed to save information. I am not sure which way is better. Maybe you can try
1.
select case formname(or function No.)
case formname1:
call function 1
case formname2:
call function 2
end select

PS. I had used string + string. It didn't work.

2.
use class module to exchange function name and function No. The method is same 1. The only different is the variable(formname) in class module that can be save until you change next time. That I know and I will do.

I wish it can help you.
shawn

TCartwright
October 23rd, 2000, 10:08 AM
Also look at the CallByName function. I think this is what you are trying to do.


Tim Cartwright 'Will write code for food.
Sr Systems Architect - Information Systems
Splitrock Services Inc.