[AccessD] running code in a database without referencing the db

Brett Barabash BBarabash at TappeConstruction.com
Thu Nov 6 14:04:13 CST 2003


Aha!  I see...

The Access.Application object has a method called "Run" that will allow
external applications to execute global procedures.  If the wizard knew the
filepath of the FE, it could reference it in a procedure using GetObject:

Dim objAccFE As Object
Set objAccFE = GetObject(mstrAccFEPath, "Access.Application")
objAccFE.Run "ProcName", "Arg1", "Arg2"
Set objAccFE = Nothing

By setting procedure-level object references and destroying them when you're
done, you shouldn't have any problems with circular references.

Also, a nice feature of the Run method is that the procedure name and
arguments can come from variables or table data, giving you complete
flexibility in a "table-driven" system.


-----Original Message-----
From: John Colby [mailto:jcolby at colbyconsulting.com]
Sent: Thursday, November 06, 2003 1:31 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] running code in a database without referencing
the db


I have a client where more and more processes need to be run automatically.
Basically they need to send (email) reports to various clients
automatically, receive reports and process spreadsheet attachments etc.

I am trying to design a generic process system where the processes can be
table driven.  I would like this code to be a referenced wizard such that I
have a FE if you will that has code in it that creates these reports and
knows how to email them out.  It has tables where it places data such as
time / date to run the process and what function to call that is the process
to run.  It starts the wizard which loads the processes and at the correct
time runs each process.

The problem is that the process code is in the FE.  The FE is starting a
wizard and thus has to reference the wizard.  The wizard has to call a
function back in the FE.  This is a circular reference and Access doesn't
like circular references.  I read stuff about circular references ages ago
but can't find anything anymore.  I vaguely recall something about as long
as the modules are divided us such that the calls out and back in don't
occur into the same module it could be done.

Or I hallucinated that.

Not sure which and can't find anything on it anymore.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Brett Barabash
Sent: Thursday, November 06, 2003 2:14 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] running code in a database without referencing
the db


Can you define "without referencing"?  Shell, DDE, mental telepathy?

-----Original Message-----
From: John Colby [mailto:jcolby at colbyconsulting.com]
Sent: Thursday, November 06, 2003 12:08 PM
To: AccessD
Subject: [AccessD] running code in a database without referencing the db


Is it possible to call a function in another database without referencing
that db?

John W. Colby
www.colbyconsulting.com


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Tappe Construction Co.

Scanning of this message and addition of this footer is performed
by SurfControl E-mail Filter software in conjunction with 
virus detection software.



More information about the AccessD mailing list