Microsoft Access & Win32::Ole



I have a database called Quotations2005 which I can open with the
following. I would also like to run some event code contained in the
switchboard form. The code is contained in Private Sub
Command23_Click()

Is this even possible? Does one use the Run Macro Command as in Word?

use strict;
use warnings;
use Win32::OLE;

my $access = CreateObject Win32::OLE 'Access.Application' || die
"Cannot create Access object\n$!\n";

$access -> {'Visible'} = 1;
$access -> OpenCurrentDatabase('d:\Access
Databases\Quotations2005.mdb');

# Here's the scary part

$access -> DoCmd -> RunMacro(Form_Switchboard.Command23_Click);
$access->Quit();

Thank you for any help.

.



Relevant Pages

  • Re: How to prevent Access from Closing
    ... Open your Switchboard form in design view, ... > Option Compare Database ... > Dim AllowClose As Boolean ... >> I want to make sure that Users always exit my database using Exit Button ...
    (microsoft.public.access.modulesdaovba)
  • Re: My switchboards wont work with WinXP !
    ... > You do not have a reference set to the ADO object library in this ... > unless of course you have ADO code in your database, ... > The Switchboard form that the wizard made for you uses ADO code ... I did not say to close the database after unchecking DAO. ...
    (microsoft.public.access.forms)
  • Re: Access 2000 Make Table Query Warning Box -- use currentdb.exec
    ... that it effects the entire database? ... When this query is run, and before it asks the user for the input, I ... I have restarted the program multiple times. ... but the warnings keep coming up. ...
    (microsoft.public.access.queries)
  • Re: Entourage database over 4GB
    ... brought in the 4 GB limit also brought in the warnings. ... AppleScripts for Entourage: ... My own database is only 500 MB or so, ... My brother is using the earliest version of Entourage ...
    (microsoft.public.mac.office.entourage)
  • Re: Creating alternate domains - manually??
    ... Your name seems very famililar so I suppose we can dispense *for you* with the usual warnings about amending the database directly because you have seen those warnings already and chose to disregard them, ... - amendments to the database should only be done either via the UI or via ... The internal domain name still works as well. ...
    (microsoft.public.sharepoint.windowsservices)