Jump to content
Fórum Script Brasil
  • 0

[du] Macro Via Delphi


Guest dDriUs
 Share

Question

1 answer to this question

Recommended Posts

  • 0

use o componente AccessApplication1 da paleta Server

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
    AccessApplication1: TAccessApplication;
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
   AccessApplication1.OpenCurrentDatabase('d:\essai.mdb',False); // banco de dados do access
   AccessApplication1.DoCmd.RunMacro('Macro1.MaMacro',emptyparam,emptyparam); // macro que voce quer executar
end;

end.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.5k
×
×
  • Create New...