Solucionado
En el boton de ok del formulario login tenia esto:
Código Delphi
[-]
if F_ModulDades.Usuaris.RecordCount=0 then
begin
Close;
F_Usuaris.Create(Self);
F_Usuaris.ShowModal;
end;
Al final he dejado el código así:
Código Delphi
[-]
procedure TF_Inici.FormShow(Sender: TObject);
begin
ComprovaTaules;
F_ModulDades.Usuaris.Close;
F_ModulDades.Usuaris.Open;
F_ModulDades.Usuaris.Last;
if F_ModulDades.Usuaris.RecordCount = 0 then
begin
F_Usuaris:=TF_Usuaris.Create(Self);
try
F_Usuaris.ShowModal;
finally
F_Usuaris.Free;
end;
end;
F_Login:=TF_Login.Create(Self);
try
F_Login.ShowModal;
finally
F_Login.Free;
end;
end;
Gracias por ayudarme a investigar el camino correcto.
Josep