variable form type ... can this be done in VB.Net

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

I would like to do the following ...

Dim lType as String

lType = "frmReport100"

Dim lFrm as lTtype

lFrm.ShowDialog



basically, I want to be able to create a form of type 'StringValue' ... i
want to use a string value to define the type of form to open.

Can I do this, and how would it be accomplished.

Thanks
Jeff

DoI need to loop through all the forms in the application ?
 
Jeff,

VBS and VBA are made for that kind of solutions.

In VB.Net it makes no sence because you can forever make a table with your
existing forms and select that.

Cor
 
jeff said:
I would like to do the following ...

Dim lType as String

lType = "frmReport100"

Dim lFrm as lTtype

lFrm.ShowDialog



basically, I want to be able to create a form of type 'StringValue'
... i want to use a string value to define the type of form to open.

Can I do this, and how would it be accomplished.

Thanks
Jeff

DoI need to loop through all the forms in the application ?


The name of a class should not matter at runtime, however, if you need it,
have a look at http://msdn2.microsoft.com/en-us/library/k3a58006.aspx
(look for "CreateInstance" on the page)


Armin
 
what i have is ...

i am building a report access form ... shows a list of all the reports a
user has access to in the application. The form has a treeview (group >
report) and a data grid (list of all the reports). I load the treeview with
a list of all the report groups, I load the datagird with all the reports.
User selects node in treeview, list is filtered...basic ui functionality.

Now,

each report has a seperate (custom) Parameter Form - allowing the user to
enter criteria for the selected report.

in the database, I store
- master list of reports
- corresponding custom parameter forum.
- user access list (list of reports each user has access to)

So, what I want to do is ...

- code the report access form so that I never have touch the code again ...
( i want to avoid using a select case )

Here was my thought...

- user selects a report to print.
- from the select row, I would get the name of the custom parameter window
(frmReport100_10_parameter)
- store this as a string
- create a temp form, showdialog it, dipose of it.
- done.

I would never have to code this window again. All report showing, printing,
.... would be handled by the custom parameter form.

lParameterForm = row.get.ParameterFormName
Dim lTemp as lParameterForm
lTemp.ShowDialog
lTemp.Dispose

Done.

With this setup, when I add a report to the application, I create the
report, I create the custom parameter window, I add a row to the database.
Done. I do not have to add code the report access form in order to open the
required parameter window...

this is why I would like to do this ...


So, in VB.Net, I can forever make a table of existing forms and select that
.... how do I do this ? Make a Table of Forms and Select that.... this is
what I am doing ... at least I thought this is what I am doing.

Again,

Is there a way to ... either ...

iterate through all the forms in may application looking for
'frmReportParameter100_10', find it, showdialogue, close it, dispose it...

or

get a form type from a table, store it in a string (lFormType), create an
object of type lFormType (ie. 'frmReportParameter100_10'), make the object
realize it is a form and that showdialog is a valid call, call the method
showdialog and dispose of the object.


That is my question - should have included a bit more background in
origonal.

Sorry.
Jeff.

I want to avoid this in my master report access form ...

....

Case "100-01" ' Batch Time Sheet Print.

Dim lFrm As New frmReport100_01
lFrm.ShowDialog()
lFrm.Dispose()

Case "100-02" ' Time Review for a period ... report for Driver availability

Dim lFrm As New frmReport100_02
lFrm.ShowDialog()
lFrm.Dispose()

Case "110-01" ' Driver Log - Batch print detailed driver log reports.

Dim lFrm As New frmReport110_01
lFrm.ShowDialog()
lFrm.Dispose()
....
 
Perhaps this will assist you.


Sub ShowForm(ByVal FormName As String)
Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name
Try
Dim FormType As Type = Type.GetType(ProjectName & "." & FormName)
Dim frmObject As Object = Activator.CreateInstance(FormType)

DirectCast(frmObject, Form).StartPosition =
FormStartPosition.CenterParent
DirectCast(frmObject, Form).ShowDialog()
Catch ex As Exception
Console.WriteLine("Oooops")
Console.WriteLine(ex.Message)
End Try
End Sub
 
jeff,

You can set all your forms in a table

dim formList as form[] = {Form1, Form2, form3, form4}

dim formNames as String[] = {"OpenForm", "Invoice Form", "WhateverForm",
"OtherForm"}

Search the formnames, take the index and use the form in the formList with
the same index

If you don't understand this, please reply

(You can also set it in a sorted list, use a hashtable, create a class and
than a generic table or an arraylist, however the principle is the same)

Cor
 
Armin,

I thought you did (like me) not like late binding, the method I provid is so
simple.

Cor
 
I thought you did (like me) not like late binding, the method I provid
is so simple.

Yes definately simple - bit slightly hardcoded. Tho an array of types +
late binding = plugin system :-)
 
Cor Ligthert said:
Armin,

I thought you did (like me) not like late binding,

Yes, I don't like it as long as it is avoidable and can be done with other
programming means. I also expressed it by writing that a class name should
not matter at runtime. Though, I didn't want to conceal the possibility of
reflection. In the end, it's up to the OP to use it or not.
I didn't see Smokey's answer yet when I was answering, and.....
the method I
provid is so simple.

..... I didn't have your 2nd post where you explained what you mean with
"table".

BTW, Hi Cor (and Hi group)! :-)


Armin
 
Cor,

Again, this is not what I am after, i do not want to hard code this in the
application ... I want to be able to control this from a database table - so
I do not have to worry about adding the form to the 'code' form list before
I can access it. this would be no different than using a select statement -
it would be another piece of code that needs to be maintained.

- add row to database (new report)
- create parameter window
- assign user priviledges

.... open application, go to report access form, select the form from the
grid view, parameter form opens.

.... to me managing this formlist (in code) is an unnecessary step and
becomes maintenance issue (one etrxa place I need to maintain code). By
putting it in the database, I do not need to worry about it - once I test
that forum opens properly.

Kevin G. example (later post) is exactly what I was after.

Private Sub ueShowForm(ByVal aForm As String, ByVal aTitle As String)

Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name
Try

Dim FormType As Type = Type.GetType(ProjectName & "." & aForm)
Dim frmObject As Object = Activator.CreateInstance(FormType)
DirectCast(frmObject, Form).Text = aTitle
DirectCast(frmObject, Form).ShowDialog()

Catch ex As Exception

MessageBox.Show(ex.Message, aForm + " does not exist - CHECK SPELLING.
")

End Try

End Sub


Cor Ligthert said:
jeff,

You can set all your forms in a table

dim formList as form[] = {Form1, Form2, form3, form4}

dim formNames as String[] = {"OpenForm", "Invoice Form", "WhateverForm",
"OtherForm"}

Search the formnames, take the index and use the form in the formList with
the same index

If you don't understand this, please reply

(You can also set it in a sorted list, use a hashtable, create a class and
than a generic table or an arraylist, however the principle is the same)

Cor




jeff said:
what i have is ...

i am building a report access form ... shows a list of all the reports a
user has access to in the application. The form has a treeview (group >
report) and a data grid (list of all the reports). I load the treeview
with a list of all the report groups, I load the datagird with all the
reports. User selects node in treeview, list is filtered...basic ui
functionality.

Now,

each report has a seperate (custom) Parameter Form - allowing the user to
enter criteria for the selected report.

in the database, I store
- master list of reports
- corresponding custom parameter forum.
- user access list (list of reports each user has access to)

So, what I want to do is ...

- code the report access form so that I never have touch the code again
... ( i want to avoid using a select case )

Here was my thought...

- user selects a report to print.
- from the select row, I would get the name of the custom parameter
window (frmReport100_10_parameter)
- store this as a string
- create a temp form, showdialog it, dipose of it.
- done.

I would never have to code this window again. All report showing,
printing, ... would be handled by the custom parameter form.

lParameterForm = row.get.ParameterFormName
Dim lTemp as lParameterForm
lTemp.ShowDialog
lTemp.Dispose

Done.

With this setup, when I add a report to the application, I create the
report, I create the custom parameter window, I add a row to the
database. Done. I do not have to add code the report access form in
order to open the required parameter window...

this is why I would like to do this ...


So, in VB.Net, I can forever make a table of existing forms and select
that ... how do I do this ? Make a Table of Forms and Select that....
this is what I am doing ... at least I thought this is what I am doing.

Again,

Is there a way to ... either ...

iterate through all the forms in may application looking for
'frmReportParameter100_10', find it, showdialogue, close it, dispose
it...

or

get a form type from a table, store it in a string (lFormType), create an
object of type lFormType (ie. 'frmReportParameter100_10'), make the
object realize it is a form and that showdialog is a valid call, call the
method showdialog and dispose of the object.


That is my question - should have included a bit more background in
origonal.

Sorry.
Jeff.

I want to avoid this in my master report access form ...

...

Case "100-01" ' Batch Time Sheet Print.

Dim lFrm As New frmReport100_01
lFrm.ShowDialog()
lFrm.Dispose()

Case "100-02" ' Time Review for a period ... report for Driver
availability

Dim lFrm As New frmReport100_02
lFrm.ShowDialog()
lFrm.Dispose()

Case "110-01" ' Driver Log - Batch print detailed driver log reports.

Dim lFrm As New frmReport110_01
lFrm.ShowDialog()
lFrm.Dispose()
...
 
Jeff,

As I said you are after a VBS or VB6 type of solution.

This is called late binding.
Beside that it is slow, is it not as secure as in my idea a Net application
should be.

(I know it very good as well, however will never advice it)

Cor

jeff said:
Cor,

Again, this is not what I am after, i do not want to hard code this in the
application ... I want to be able to control this from a database table -
so I do not have to worry about adding the form to the 'code' form list
before I can access it. this would be no different than using a select
statement - it would be another piece of code that needs to be maintained.

- add row to database (new report)
- create parameter window
- assign user priviledges

... open application, go to report access form, select the form from the
grid view, parameter form opens.

... to me managing this formlist (in code) is an unnecessary step and
becomes maintenance issue (one etrxa place I need to maintain code). By
putting it in the database, I do not need to worry about it - once I test
that forum opens properly.

Kevin G. example (later post) is exactly what I was after.

Private Sub ueShowForm(ByVal aForm As String, ByVal aTitle As String)

Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name
Try

Dim FormType As Type = Type.GetType(ProjectName & "." & aForm)
Dim frmObject As Object = Activator.CreateInstance(FormType)
DirectCast(frmObject, Form).Text = aTitle
DirectCast(frmObject, Form).ShowDialog()

Catch ex As Exception

MessageBox.Show(ex.Message, aForm + " does not exist - CHECK
SPELLING. ")

End Try

End Sub


Cor Ligthert said:
jeff,

You can set all your forms in a table

dim formList as form[] = {Form1, Form2, form3, form4}

dim formNames as String[] = {"OpenForm", "Invoice Form", "WhateverForm",
"OtherForm"}

Search the formnames, take the index and use the form in the formList
with the same index

If you don't understand this, please reply

(You can also set it in a sorted list, use a hashtable, create a class
and than a generic table or an arraylist, however the principle is the
same)

Cor




jeff said:
what i have is ...

i am building a report access form ... shows a list of all the reports a
user has access to in the application. The form has a treeview (group >
report) and a data grid (list of all the reports). I load the treeview
with a list of all the report groups, I load the datagird with all the
reports. User selects node in treeview, list is filtered...basic ui
functionality.

Now,

each report has a seperate (custom) Parameter Form - allowing the user
to enter criteria for the selected report.

in the database, I store
- master list of reports
- corresponding custom parameter forum.
- user access list (list of reports each user has access to)

So, what I want to do is ...

- code the report access form so that I never have touch the code again
... ( i want to avoid using a select case )

Here was my thought...

- user selects a report to print.
- from the select row, I would get the name of the custom parameter
window (frmReport100_10_parameter)
- store this as a string
- create a temp form, showdialog it, dipose of it.
- done.

I would never have to code this window again. All report showing,
printing, ... would be handled by the custom parameter form.

lParameterForm = row.get.ParameterFormName
Dim lTemp as lParameterForm
lTemp.ShowDialog
lTemp.Dispose

Done.

With this setup, when I add a report to the application, I create the
report, I create the custom parameter window, I add a row to the
database. Done. I do not have to add code the report access form in
order to open the required parameter window...

this is why I would like to do this ...


So, in VB.Net, I can forever make a table of existing forms and select
that ... how do I do this ? Make a Table of Forms and Select that....
this is what I am doing ... at least I thought this is what I am doing.

Again,

Is there a way to ... either ...

iterate through all the forms in may application looking for
'frmReportParameter100_10', find it, showdialogue, close it, dispose
it...

or

get a form type from a table, store it in a string (lFormType), create
an object of type lFormType (ie. 'frmReportParameter100_10'), make the
object realize it is a form and that showdialog is a valid call, call
the method showdialog and dispose of the object.


That is my question - should have included a bit more background in
origonal.

Sorry.
Jeff.

I want to avoid this in my master report access form ...

...

Case "100-01" ' Batch Time Sheet Print.

Dim lFrm As New frmReport100_01
lFrm.ShowDialog()
lFrm.Dispose()

Case "100-02" ' Time Review for a period ... report for Driver
availability

Dim lFrm As New frmReport100_02
lFrm.ShowDialog()
lFrm.Dispose()

Case "110-01" ' Driver Log - Batch print detailed driver log reports.

Dim lFrm As New frmReport110_01
lFrm.ShowDialog()
lFrm.Dispose()
...



Jeff,

VBS and VBA are made for that kind of solutions.

In VB.Net it makes no sence because you can forever make a table with
your existing forms and select that.

Cor

"jeff" <jhersey at allnorth dottt com> schreef in bericht

I would like to do the following ...

Dim lType as String

lType = "frmReport100"

Dim lFrm as lTtype

lFrm.ShowDialog



basically, I want to be able to create a form of type 'StringValue'
... i want to use a string value to define the type of form to open.

Can I do this, and how would it be accomplished.

Thanks
Jeff

DoI need to loop through all the forms in the application ?
 
Thanks Cor,

as for slow ... not noticable by the end user.

as for secure ... not sure of the issue here? Prevent / protect against
somebody building their own form, save it to a dll / assembly, open the
database, change a reports 'target' parameter form, load their own form ...
a lot of work to get at the data or breach database security... if they can
access the master report table, they have already cracked the system. So, I
am unclear of the security issue here.

I want to simplify maintenance. Historically, users want more and more
reports ... using the said method, allows me (or others) to quickly and
easily add new reports, parameters without a whole lot of changes - actually
1 ... add the form. Thats all.

THanks
Jeff



Cor Ligthert said:
Jeff,

As I said you are after a VBS or VB6 type of solution.

This is called late binding.
Beside that it is slow, is it not as secure as in my idea a Net
application should be.

(I know it very good as well, however will never advice it)

Cor

jeff said:
Cor,

Again, this is not what I am after, i do not want to hard code this in
the application ... I want to be able to control this from a database
table - so I do not have to worry about adding the form to the 'code'
form list before I can access it. this would be no different than using
a select statement - it would be another piece of code that needs to be
maintained.

- add row to database (new report)
- create parameter window
- assign user priviledges

... open application, go to report access form, select the form from the
grid view, parameter form opens.

... to me managing this formlist (in code) is an unnecessary step and
becomes maintenance issue (one etrxa place I need to maintain code). By
putting it in the database, I do not need to worry about it - once I test
that forum opens properly.

Kevin G. example (later post) is exactly what I was after.

Private Sub ueShowForm(ByVal aForm As String, ByVal aTitle As String)

Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name
Try

Dim FormType As Type = Type.GetType(ProjectName & "." & aForm)
Dim frmObject As Object = Activator.CreateInstance(FormType)
DirectCast(frmObject, Form).Text = aTitle
DirectCast(frmObject, Form).ShowDialog()

Catch ex As Exception

MessageBox.Show(ex.Message, aForm + " does not exist - CHECK
SPELLING. ")

End Try

End Sub


Cor Ligthert said:
jeff,

You can set all your forms in a table

dim formList as form[] = {Form1, Form2, form3, form4}

dim formNames as String[] = {"OpenForm", "Invoice Form",
"WhateverForm", "OtherForm"}

Search the formnames, take the index and use the form in the formList
with the same index

If you don't understand this, please reply

(You can also set it in a sorted list, use a hashtable, create a class
and than a generic table or an arraylist, however the principle is the
same)

Cor




"jeff" <jhersey at allnorth dottt com> schreef in bericht

what i have is ...

i am building a report access form ... shows a list of all the reports
a user has access to in the application. The form has a treeview
(group > report) and a data grid (list of all the reports). I load the
treeview with a list of all the report groups, I load the datagird with
all the reports. User selects node in treeview, list is
filtered...basic ui functionality.

Now,

each report has a seperate (custom) Parameter Form - allowing the user
to enter criteria for the selected report.

in the database, I store
- master list of reports
- corresponding custom parameter forum.
- user access list (list of reports each user has access to)

So, what I want to do is ...

- code the report access form so that I never have touch the code again
... ( i want to avoid using a select case )

Here was my thought...

- user selects a report to print.
- from the select row, I would get the name of the custom parameter
window (frmReport100_10_parameter)
- store this as a string
- create a temp form, showdialog it, dipose of it.
- done.

I would never have to code this window again. All report showing,
printing, ... would be handled by the custom parameter form.

lParameterForm = row.get.ParameterFormName
Dim lTemp as lParameterForm
lTemp.ShowDialog
lTemp.Dispose

Done.

With this setup, when I add a report to the application, I create the
report, I create the custom parameter window, I add a row to the
database. Done. I do not have to add code the report access form in
order to open the required parameter window...

this is why I would like to do this ...


So, in VB.Net, I can forever make a table of existing forms and select
that ... how do I do this ? Make a Table of Forms and Select that....
this is what I am doing ... at least I thought this is what I am doing.

Again,

Is there a way to ... either ...

iterate through all the forms in may application looking for
'frmReportParameter100_10', find it, showdialogue, close it, dispose
it...

or

get a form type from a table, store it in a string (lFormType), create
an object of type lFormType (ie. 'frmReportParameter100_10'), make the
object realize it is a form and that showdialog is a valid call, call
the method showdialog and dispose of the object.


That is my question - should have included a bit more background in
origonal.

Sorry.
Jeff.

I want to avoid this in my master report access form ...

...

Case "100-01" ' Batch Time Sheet Print.

Dim lFrm As New frmReport100_01
lFrm.ShowDialog()
lFrm.Dispose()

Case "100-02" ' Time Review for a period ... report for Driver
availability

Dim lFrm As New frmReport100_02
lFrm.ShowDialog()
lFrm.Dispose()

Case "110-01" ' Driver Log - Batch print detailed driver log reports.

Dim lFrm As New frmReport110_01
lFrm.ShowDialog()
lFrm.Dispose()
...



Jeff,

VBS and VBA are made for that kind of solutions.

In VB.Net it makes no sence because you can forever make a table with
your existing forms and select that.

Cor

"jeff" <jhersey at allnorth dottt com> schreef in bericht

I would like to do the following ...

Dim lType as String

lType = "frmReport100"

Dim lFrm as lTtype

lFrm.ShowDialog



basically, I want to be able to create a form of type 'StringValue'
... i want to use a string value to define the type of form to open.

Can I do this, and how would it be accomplished.

Thanks
Jeff

DoI need to loop through all the forms in the application ?
 
Jeff

Are you talking about forms or about reports?

Cor

jeff said:
Thanks Cor,

as for slow ... not noticable by the end user.

as for secure ... not sure of the issue here? Prevent / protect against
somebody building their own form, save it to a dll / assembly, open the
database, change a reports 'target' parameter form, load their own form
... a lot of work to get at the data or breach database security... if
they can access the master report table, they have already cracked the
system. So, I am unclear of the security issue here.

I want to simplify maintenance. Historically, users want more and more
reports ... using the said method, allows me (or others) to quickly and
easily add new reports, parameters without a whole lot of changes -
actually 1 ... add the form. Thats all.

THanks
Jeff



Cor Ligthert said:
Jeff,

As I said you are after a VBS or VB6 type of solution.

This is called late binding.
Beside that it is slow, is it not as secure as in my idea a Net
application should be.

(I know it very good as well, however will never advice it)

Cor

jeff said:
Cor,

Again, this is not what I am after, i do not want to hard code this in
the application ... I want to be able to control this from a database
table - so I do not have to worry about adding the form to the 'code'
form list before I can access it. this would be no different than using
a select statement - it would be another piece of code that needs to be
maintained.

- add row to database (new report)
- create parameter window
- assign user priviledges

... open application, go to report access form, select the form from the
grid view, parameter form opens.

... to me managing this formlist (in code) is an unnecessary step and
becomes maintenance issue (one etrxa place I need to maintain code).
By putting it in the database, I do not need to worry about it - once I
test that forum opens properly.

Kevin G. example (later post) is exactly what I was after.

Private Sub ueShowForm(ByVal aForm As String, ByVal aTitle As String)

Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name
Try

Dim FormType As Type = Type.GetType(ProjectName & "." & aForm)
Dim frmObject As Object = Activator.CreateInstance(FormType)
DirectCast(frmObject, Form).Text = aTitle
DirectCast(frmObject, Form).ShowDialog()

Catch ex As Exception

MessageBox.Show(ex.Message, aForm + " does not exist - CHECK
SPELLING. ")

End Try

End Sub


jeff,

You can set all your forms in a table

dim formList as form[] = {Form1, Form2, form3, form4}

dim formNames as String[] = {"OpenForm", "Invoice Form",
"WhateverForm", "OtherForm"}

Search the formnames, take the index and use the form in the formList
with the same index

If you don't understand this, please reply

(You can also set it in a sorted list, use a hashtable, create a class
and than a generic table or an arraylist, however the principle is the
same)

Cor




"jeff" <jhersey at allnorth dottt com> schreef in bericht

what i have is ...

i am building a report access form ... shows a list of all the reports
a user has access to in the application. The form has a treeview
(group > report) and a data grid (list of all the reports). I load
the treeview with a list of all the report groups, I load the datagird
with all the reports. User selects node in treeview, list is
filtered...basic ui functionality.

Now,

each report has a seperate (custom) Parameter Form - allowing the user
to enter criteria for the selected report.

in the database, I store
- master list of reports
- corresponding custom parameter forum.
- user access list (list of reports each user has access to)

So, what I want to do is ...

- code the report access form so that I never have touch the code
again ... ( i want to avoid using a select case )

Here was my thought...

- user selects a report to print.
- from the select row, I would get the name of the custom parameter
window (frmReport100_10_parameter)
- store this as a string
- create a temp form, showdialog it, dipose of it.
- done.

I would never have to code this window again. All report showing,
printing, ... would be handled by the custom parameter form.

lParameterForm = row.get.ParameterFormName
Dim lTemp as lParameterForm
lTemp.ShowDialog
lTemp.Dispose

Done.

With this setup, when I add a report to the application, I create the
report, I create the custom parameter window, I add a row to the
database. Done. I do not have to add code the report access form in
order to open the required parameter window...

this is why I would like to do this ...


So, in VB.Net, I can forever make a table of existing forms and select
that ... how do I do this ? Make a Table of Forms and Select that....
this is what I am doing ... at least I thought this is what I am
doing.

Again,

Is there a way to ... either ...

iterate through all the forms in may application looking for
'frmReportParameter100_10', find it, showdialogue, close it, dispose
it...

or

get a form type from a table, store it in a string (lFormType), create
an object of type lFormType (ie. 'frmReportParameter100_10'), make the
object realize it is a form and that showdialog is a valid call, call
the method showdialog and dispose of the object.


That is my question - should have included a bit more background in
origonal.

Sorry.
Jeff.

I want to avoid this in my master report access form ...

...

Case "100-01" ' Batch Time Sheet Print.

Dim lFrm As New frmReport100_01
lFrm.ShowDialog()
lFrm.Dispose()

Case "100-02" ' Time Review for a period ... report for Driver
availability

Dim lFrm As New frmReport100_02
lFrm.ShowDialog()
lFrm.Dispose()

Case "110-01" ' Driver Log - Batch print detailed driver log reports.

Dim lFrm As New frmReport110_01
lFrm.ShowDialog()
lFrm.Dispose()
...



Jeff,

VBS and VBA are made for that kind of solutions.

In VB.Net it makes no sence because you can forever make a table with
your existing forms and select that.

Cor

"jeff" <jhersey at allnorth dottt com> schreef in bericht

I would like to do the following ...

Dim lType as String

lType = "frmReport100"

Dim lFrm as lTtype

lFrm.ShowDialog



basically, I want to be able to create a form of type 'StringValue'
... i want to use a string value to define the type of form to open.

Can I do this, and how would it be accomplished.

Thanks
Jeff

DoI need to loop through all the forms in the application ?
 
Cor Ligthert [MVP] schreef:
Jeff,

VBS and VBA are made for that kind of solutions.

In VB.Net it makes no sence because you can forever make a table with your
existing forms and select that.

Cor

Cor, even een tip. Ik heb je deze fout al veel zien maken. Jij schrijft
vaak 'forever' wanneer je 'always' bedoeld.
 
Back
Top