Главная страница | назад





Article #16342: Access violation on form's constructor

 Question and Answer Database
FAQ1342C.txt Access violation on form's constructor
Category :VCL
Platform :All
Product :C++Builder 1.x
Question:
Why am I getting Access Violation with this code on my
Form's constructor?
DataModule1->Table1->DisableControls();
DataModule1->Table2->DisableControls();
Answer:
Because the DataModule form doesn't exist yet.
Change the order of the forms automatically created on your
project at Options | Project | Forms by moving the DataModule
form to be first on the list.
You can also move the code to the OnActivate event handler
on the original form.
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99