[AccessD] AutoExec Macro Question

Charlotte Foust cfoust at infostatsystems.com
Mon Mar 10 13:46:59 CST 2003


You dim a boolean as static inside the routine.  One you set it, it
stays set for that session.

Static fConnection As Boolean

Charlotte Foust

-----Original Message-----
From: Susan Zeller [mailto:szeller at cce.umn.edu] 
Sent: Monday, March 10, 2003 10:54 AM
To: accessd at databaseadvisors.com
Subject: re: [AccessD] AutoExec Macro Question


I'm not familiar with the Static flag.  Can you explain how this works
and how I implement it? Couldn't find anything by this title in help.

Thanks.

--Susan


-----Original Message-----
From: Stuart McLachlan [mailto:stuart at lexacorp.com.pg] 
Sent: Thursday, March 06, 2003 5:55 PM
To: Susan Zeller; accessd at databaseadvisors.com
Subject: RE: [AccessD] AutoExec Macro Question


Use a STATIC flag in the function and only create the connection the
first time the 
function is run. Then you can safely call it from the splash screen no
matter how many 
times the splash screen is opened.

> Chris,
> 
> I know, I know!  I have never used a Macro before, but in this case, 
> my splash screen is also my main menu page and so users return to it 
> over and over.  The code that I wanted to call in the Autoexec Marco 
> creates a connetion to my SQL Server using "Application Role" 
> security.  The way this works, I can only run this code once during 
> the application. If it's called a second time, it gives an error.
> 
> I changed the name of the function from Load to basLoad can put
> basLoad() in the macro.  None of that works.  So, I'm building a 
> separate splash screen and putting the basLoad on open of that form.
> 
> Still seems a mystery to me, though.
> 
> --Susan
> 
> -----Original Message-----
> From: Chris Mackin [mailto:chris at denverdb.com]
> Sent: Wednesday, March 05, 2003 4:41 PM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] AutoExec Macro Question
> 
> 
> "What am I doing wrong?"
> 
> Using a Macro.  Assuming you have a startup form selected you can call

> that code from any of the events of that form, Open, Load or Close 
> seem like 3 obvious choices depending on what you're doing in the 
> code.
> 
> Chris Mackin
> Denver Database Consulting, LLC
> www.denverdb.com
> 
> 
> -----Original Message-----
> From: accessd-admin at databaseadvisors.com
> [mailto:accessd-admin at databaseadvisors.com]On Behalf Of Susan Zeller
> Sent: Wednesday, March 05, 2003 3:30 PM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] AutoExec Macro Question
> 
> 
> I'm trying to use an AutoExec macro for the first time.  I have an 
> Acess XP ADP in Access 2002 format.  I want to run a bit of code on 
> start of the application so I created a macro called AutoExec which 
> has one step: RunCode and in it I call a function called LOAD which is

> public and is in a module.  When I start my application, it says it
> can't find Load. What am I doing wrong?
> 
> --Susan
> 
> 
> Susan B. Zeller
> Office of Information Systems
> College of Continuing Education
> University of Minnesota
> 306 Wesbrook Hall
> 77 Pleasant Street SE
> Minneapolis, MN 55455
> Phone:  612-626-4785
> Fax:  612-625-2568
> 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.



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



More information about the AccessD mailing list