Ver Mensaje Individual
  #3  
Antiguo 30-05-2003
XLeoX XLeoX is offline
Miembro
 
Registrado: may 2003
Ubicación: Tijuana, Mexico
Posts: 13
Reputación: 0
XLeoX Va por buen camino
Vi este codigo en http://www.scalabium.com/faq/dct0083.htm

procedure TForm1.Button1Click(Sender: TObject);
var
Access: Variant;
begin
{open the Access application}
try
Access := GetActiveOleObject('Access.Application');
except
Access := CreateOleObject('Access.Application');
end;
Access.Visible := True;
Access.OpenCurrentDatabase('C:\sistemas\gascan pc\db\gascan.mdb', True);

Access.DoCmd.OpenReport('Rtest', acViewPreview, EmptyParam, EmptyParam);

{close the database}
Access.CloseCurrentDatabase;

Access.Quit(acQuitSaveAll);
end;

pero me aparecen estos errores:
[Error] Unit1.pas(35): Undeclared identifier: 'GetActiveOleObject'
[Error] Unit1.pas(37): Undeclared identifier: 'CreateOleObject'

agradesco la atencion a este novato
__________________
L.I. Leobardo Parra Ramírez
leobardoparra@hotmail.com
Responder Con Cita