Set focus from MDI main form to child?

Under D1 I have a TMaskEdit on a MDI main form and I want it to set the
focus to the active MDI child when the user presses enter.
Unfortunately, it does not work.  Here is the OnKeyDown event that I use
for the TMaskEdit:

procedure TMainForm.MaskEdit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  {if the user presses enter}
  if (Key = VK_RETURN) then begin
{put in a do nothing key}
     key := VK_SHIFT;
     if ActiveMDIChild <> nil then begin
        ActiveMDIChild.BringToFront;
        ActiveMDIChild.SetFocus;
     end;
  end;
end;

Any suggestions?
Thanks in advance.
--
Derek Agar
da...@rc.edu
248-218-2081
fax: 248-218-2085

  vcard.vcf
< 1K Download