Many thanks. I did consider that but here's the problem:  OnClose or
OnDeactivate will not help me as the act_new procedure must run as the form
opens in showmodal but not if the form opens as a normal form.  I think I
have just answered my own question though

 

I have now put the following code in the OnCreate event of frm_client

 

if frm_Client.FormState = [fsModal] then

  begin

    act_New.Execute

  end;

 

 

It gives an access violation though.  I will try the onActivate event now

 

Regards

Dino Lolli

Sales and Support

Soft Edge Solutions

We do computer maintenance, networking, hardware and software sales and
website development

We are the proud developers of Plumber's Assistant

[EMAIL PROTECTED]

www.softedgesolutions.co.za <http://www.softedgesolutions.co.za/> 

Cell: 082 572 1059

Fax: 0866 84 73 73

skypeGreen Skype: dino_lolli

 

Click here <http://www.softedgesolutions.co.za/mailinglist>  to join the
monthly newsletter

 

From: delphi-en@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Martin Wynne
Sent: 31 May 2008 11:55 AM
To: delphi-en@yahoogroups.com
Subject: Re: [delphi-en] Code after showmodal statement

 

Hi,

> The act_new.execute cannor run as it only executes after the form is
closed.
> What would be the correct way to achieve the act_new.execute in this code?

Put it in the OnDeactivate or OnClose event of frm_Client.

regards,

Martin.

 



[Non-text portions of this message have been removed]

Reply via email to