after the last IF statement, you must exit from procedure or insert SQLQuery1.First to the ELSE statement.
or use TRY EXCEPT block:
procedure TForm1.Button1Click(Sender: TObject);
var
msg: String;
begin
try
msg:='MySQLConn not connected .!';
MySQLConn.Connected:=true;
msg:='SQLTransaction1 not active .!';
SQLTransaction1.Active:=True;
msg:='SQLQuery1 not active ...!';
SQLQuery1.Active:=True;
SQLQuery1.First;
except
MessageDlg('Error', msg, mtError, [mbOK], 0);
end;
end;