Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 26th, 2009, 04:06 PM
Registered User
 
Join Date: Dec 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ttitto
Default running a sub at the start of a database

i have an access database .accdb, I want to call a sub SetDate when the database is starting. I can not find this information in the access vba help. It is very simple in Excel but not in access.

Could someone please help me how to do it?!
 
Old January 22nd, 2010, 09:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

You need to call that Sub in a function. After you complete the function, then you need to create a macro that calls that function. Name the macro AutoExec.

When you start the MDB, the AutoExec will fire and call the function. The function will call the sub.
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Running 97 Access Database in 2003 etherz Access 9 May 14th, 2008 08:14 AM
Using a remote database from the start RichardLaw ASP.NET 2.0 Basics 0 November 14th, 2006 05:13 AM
Where do I start my database programming in C#? Crazy4C C# 2 April 20th, 2006 05:03 AM
Running ASP in distributed database environment zonash999 Classic ASP Professional 0 March 7th, 2006 01:51 AM
Running a search on database from form kuznickic Access VBA 3 February 3rd, 2005 06:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.