Mirror

How to call and display a form, when its name is stored in the field of a TTable (Views: 101)


Problem/Question/Abstract:

My table has a field named FormName, in which I store the name of the forms my application is using. How can I display the form of which the name is stored in the table?

Answer:

The best you can do is:

if Table1.FieldByName('NameForm').AsString = 'SomeForm' then
  SomeForm.Show
else if Table1.FieldByName('NameForm').AsString = 'SomeOtherForm' then
  SomeOtherForm.Show;

<< Back to main page