vba automate various processes
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » VBA to automate various processes upon opening a database

VBA to automate various processes upon opening a database

resolvedResolved · Medium Priority · Version 2007

replyReply Fri 28 May 2010, 10:06Delegate Mark said...

Mark has attended:
Access VBA course

VBA to automate various processes upon opening a database

Is there a way of setting a database to use Overlapping Windows and turn of the navigation pane (I would prefer not to do this every time I needed to create another database based on a template I have created). Also, how would I set a particular form to open automatically when the database is opened?

For upcoming training course dates see: Pricing & availability

replyReply Tue 1 Jun 2010, 09:29Trainer Simon said...

RE: VBA to automate various processes upon opening a database

Hi Mark,

Thank you for your question.

I am currently training on-site and will have a look at the question later today.

Regards

Simon

replyReply Wed 2 Jun 2010, 16:33Trainer Anthony said...

RE: VBA to automate various processes upon opening a database

Hi Mark, thanks for your query. When it comes to forms, it depends on whether you are talking about an Access database form or a VBA form. Treat an Access database form exactly the same as a Switchboard form, but use the statement frmMain.Show (for example) to show a VBA form.

As for how to trigger it off automatically, this ties into your first point about setting application properties such as Overlapping Windows from the word go. A full explanation is beyond the scope of this forum, but essentially, you need to create an AutoExec subroutine. This is not as simply as it is in Excel or Word VBA but an outline of how to do so can be found here:

http://www.vb123.com/toolshed/05_map/ch04_autoexec.htm

Simon has worked out the line of code needed to switch off Overlapping Windows (it is a particularly obscure line of code) and this statement will need to go into the AutoExec subroutine. I'll get him to post it as soon as he is free.

I hope this helps. Let us know how you get on.

Anthony

Wed 9 Jun 2010: Automatically marked as resolved.

 

Please browse our web site to find out more about
access courses and other Microsoft training courses.

Access tip:

Remove spaces in a table

If you have a table that has too many space marks littered around, you can create a update query and use the trim function to get rid of any excess space marks

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard