<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [AccessD] Macro Example</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2><Then again, there are many who consider Access a toy and VBA in code little more than macros.></FONT>
</P>

<P><FONT SIZE=2>Not to date myself too much but I remember the days when  assembler programmers pooh-poohed any "high level language" programmers as weenies 'cause "real men" program only in assembler. This disguised game of whose is longer has been going on forever. IMHO whatever tool (no pun intended) fits the job is the way to go. :-)</FONT></P>

<P><FONT SIZE=2>PS While I agree with JC's comments about macros faults, I do believe they have there place in a RAD environment. I use them for quick prototyping. I later go back and create real code once I am satisfied I am on the right track.</FONT></P>

<P><FONT SIZE=2>Jim Hale</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Henry Simpson [<A HREF="mailto:hsimpson88@hotmail.com">mailto:hsimpson88@hotmail.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Thursday, April 24, 2003 11:40 PM</FONT>
<BR><FONT SIZE=2>To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2>Subject: RE: [AccessD] Macro Example</FONT>
</P>
<BR>

<P><FONT SIZE=2>In Word, there are Document New, Open and Close event procedure hooks that </FONT>
<BR><FONT SIZE=2>are not invoked by a user but by one who writes code.  As far as I know, a </FONT>
<BR><FONT SIZE=2>user can only avoid the code by disabling macros or placing a break in the </FONT>
<BR><FONT SIZE=2>code window and ending execution, and that is only possible if the document </FONT>
<BR><FONT SIZE=2>is not locked.  I believe code must be written or pasted into these hooks </FONT>
<BR><FONT SIZE=2>and cannot be recorded directly into them.  Note also that Access 97 has the </FONT>
<BR><FONT SIZE=2>facility to convert Access macros to code, complete with error handler.  </FONT>
<BR><FONT SIZE=2>Excel and Word also have a forms/controls interface and although the </FONT>
<BR><FONT SIZE=2>procedures, both functions and subroutines, are commonly called macros, this </FONT>
<BR><FONT SIZE=2>deprecates the reality.  I have written procedures in Word and Excel that </FONT>
<BR><FONT SIZE=2>have updated a database.  A Word form using code with a reference to DAO or </FONT>
<BR><FONT SIZE=2>ADO is as capable as any unbound Access form.  Then again, there are many </FONT>
<BR><FONT SIZE=2>who consider Access a toy and VBA in code little more than macros.  Maybe </FONT>
<BR><FONT SIZE=2>when Access becomes fully object oriented and better supports collaborative </FONT>
<BR><FONT SIZE=2>development???  Access macros are unique in comparison with the rest of the </FONT>
<BR><FONT SIZE=2>Office suite.</FONT>
</P>

<P><FONT SIZE=2>Hen</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>>From: "John W. Colby" <jcolby@colbyconsulting.com></FONT>
<BR><FONT SIZE=2>>Reply-To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2>>To: <accessd@databaseadvisors.com></FONT>
<BR><FONT SIZE=2>>Subject: RE: [AccessD] Macro Example</FONT>
<BR><FONT SIZE=2>>Date: Thu, 24 Apr 2003 17:42:24 -0400</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>If I may chime in...</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>Macros in Excel CREATE visual basic code.  A macro recorder (in the olden</FONT>
<BR><FONT SIZE=2>>days) was a recording of the keystrokes and mouse clicks that the user</FONT>
<BR><FONT SIZE=2>>entered.  Excel still works that way, but the "macro" is no longer just the</FONT>
<BR><FONT SIZE=2>>recorded keystrokes, but rather a VB program that represents the results of</FONT>
<BR><FONT SIZE=2>>those mouse clicks and keystrokes.  Thus a macro in Excel isn't truly a</FONT>
<BR><FONT SIZE=2>>macro in the original sense, but rather a true VB program that emulates the</FONT>
<BR><FONT SIZE=2>>original intent.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>John W. Colby</FONT>
<BR><FONT SIZE=2>>Colby Consulting</FONT>
<BR><FONT SIZE=2>>www.ColbyConsulting.com</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>-----Original Message-----</FONT>
<BR><FONT SIZE=2>>From: accessd-bounces@databaseadvisors.com</FONT>
<BR><FONT SIZE=2>>[<A HREF="mailto:accessd-bounces@databaseadvisors.com">mailto:accessd-bounces@databaseadvisors.com</A>]On Behalf Of</FONT>
<BR><FONT SIZE=2>>rusty.hammond@cpiqpc.com</FONT>
<BR><FONT SIZE=2>>Sent: Thursday, April 24, 2003 2:31 PM</FONT>
<BR><FONT SIZE=2>>To: accessd@databaseadvisors.com</FONT>
<BR><FONT SIZE=2>>Subject: RE: [AccessD] Macro Example</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>If I may chime in.  I think it was SusanH that posted the definition of a</FONT>
<BR><FONT SIZE=2>>macro according to pcwebopedia that stated "In a way, macros are like </FONT>
<BR><FONT SIZE=2>>simple</FONT>
<BR><FONT SIZE=2>>programs or batch files. Some applications support sophisticated macros </FONT>
<BR><FONT SIZE=2>>that</FONT>
<BR><FONT SIZE=2>>even allow you to use variables and flow control structures such as loops."</FONT>
<BR><FONT SIZE=2>>I think Microsoft has taken the sophisticated macro to an extreme with Word</FONT>
<BR><FONT SIZE=2>>and Excel macros, nonetheless Microsoft obviously still considers them a</FONT>
<BR><FONT SIZE=2>>macro since you get to them by going to Tools/Macros.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>If I were writing a book about Word or Excel, I would refer to these</FONT>
<BR><FONT SIZE=2>>procedures as macros.  If I were writing a book about Access, I would point</FONT>
<BR><FONT SIZE=2>>out the difference betweeen macros and modules.  If I were writing a book</FONT>
<BR><FONT SIZE=2>>about all three, I would point out the modules in Access use the same VBA </FONT>
<BR><FONT SIZE=2>>as</FONT>
<BR><FONT SIZE=2>>Word and Excel macros.  It all depends on what application you're talking</FONT>
<BR><FONT SIZE=2>>about and that particular applications' use of the technology.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>just my 2 cents.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>RustyH</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>_________________________________________________________________</FONT>
<BR><FONT SIZE=2>STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   </FONT>
<BR><FONT SIZE=2><A HREF="http://join.msn.com/?page=features/junkmail" TARGET="_blank">http://join.msn.com/?page=features/junkmail</A></FONT>
</P>

<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>AccessD mailing list</FONT>
<BR><FONT SIZE=2>AccessD@databaseadvisors.com</FONT>
<BR><FONT SIZE=2><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd" TARGET="_blank">http://databaseadvisors.com/mailman/listinfo/accessd</A></FONT>
<BR><FONT SIZE=2>Website: <A HREF="http://www.databaseadvisors.com" TARGET="_blank">http://www.databaseadvisors.com</A></FONT>
</P>

</BODY>
</HTML>