CHeighlund
Programmer
I'm trying to work out a set of forms for a delphi program. These are 'forms' both in the delphi sense, and the literal sense; they're intended to replace a set of paper forms currently in use by our clients.
Given that three of the forms I'm immediately working with are nearly identical to each other, I created a sort of generic 'Survey Form' page, then tried to expand on it by copying the single form elsewhere, opening and renaming the copy, and handling all the form-specific details there. For the first one I tried, I had no problems. For the second, the program compiled, but whenver I click on the button for that form on my 'main screen' (five buttons, one for each of four forms and an exit button) the compiler throws an error on me the first time I attempt to access the second form.
Actual error -
Code that produces it -
Again, the first line triggers the error, but the second will do so as well if the first is commented out.
Similar code for the non-erring form -
I know this probably isn't enough information to let anyone solve the problem, but could someone suggest where in my code I might want to start looking? Again, the code for the second form compiles - the program does start. It just throws that error on me any time I try to reference the form. (And yes, I did remember to include the form in the 'main' form's uses clause.)
Given that three of the forms I'm immediately working with are nearly identical to each other, I created a sort of generic 'Survey Form' page, then tried to expand on it by copying the single form elsewhere, opening and renaming the copy, and handling all the form-specific details there. For the first one I tried, I had no problems. For the second, the program compiled, but whenver I click on the button for that form on my 'main screen' (five buttons, one for each of four forms and an exit button) the compiler throws an error on me the first time I attempt to access the second form.
Actual error -
Code:
Access violation at address 0047A243 in module 'SurveySheets.exe'. Read of address 00000294.
Code that produces it -
Code:
formSurveyInputScreenNhfe.frmInptScrnNfhe.pnlNfheQA.Visible := True;
formSurveyInputScreenNhfe.frmInptScrnNfhe.ShowModal;
Similar code for the non-erring form -
Code:
formSurveyInputScreenHnhd.frmInptScrnHnhd.pnlHnhdQA.Visible := True;
formSurveyInputScreenHnhd.frmInptScrnHnhd.ShowModal;
I know this probably isn't enough information to let anyone solve the problem, but could someone suggest where in my code I might want to start looking? Again, the code for the second form compiles - the program does start. It just throws that error on me any time I try to reference the form. (And yes, I did remember to include the form in the 'main' form's uses clause.)