Topic: Guys please help me with the reminder

Hi All,

I would really appreciate it if some one can reply my msg.
When I run the code all works well no errors but I don not get the pop up msg.

procedure frmCalibrations_OnShow (Sender: TObject; Action: string);
begin
     Timer := TTimer.Create(frmCalibrations);
     Timer.Interval := 60000;
     Timer.OnTimer := @OnTimer;
     OnTimer;
     Timer.Enabled := true;
end;

procedure Form1_OnClose (Sender: string; Action: string);
begin
     Timer.Free;
end;


procedure OnTimer;

var
    sMessage: string = '';
begin
              sMessage := SQLExecute('SELECT message FROM tblReminder WHERE DATE_FORMAT(datetime, ''%Y-%m-%d %H:%i:%S'') = DATE_FORMAT(''%Y-%m-%d %H:%i:%S'', NOW()) ');
              if sMessage<>'' then
              begin
              ShowMessage(sMessage);
              end;
end;

Re: Guys please help me with the reminder

Hi Wayne,
If you add your project, someone should be able to sort it.
Your code to display a timed message is fine but I'm not sure about your 'sqlexecute' statement - what are you actually trying to compare with 'now'?
As it is, it's not finding a match from tblreminder and so nothing is displayed (adding an 'else' to the OnTimer procedure to display a 'not found' message would confirm that).
Derek.

Re: Guys please help me with the reminder

Hi Derek,

Could you pop me an email on wayne.holloway@icloud.com please.

Regards
Wayne