Topics Search

Event-Driven Programming Using Macros

Event-Driven Programming Using Macros
Views: 96
Learn: What is event-driven programming? What is a trigger? How do I design a trigger? How does the macro editor in Access work? How do I attach a macro to an event? What is the SetValue action? How is it used? How do I make the execution of particular macro actions conditional? What is a switchboard and how do I create one for my application? How to I make things happen when the application is opened? What are the advantages and disadvantages of event-driven programming? (pdf file, install Acrobat Reader to read this tutorial.)
Sponsored Links:

Similar posts...

 

Convert Macros to VBA

Convert Macros to VBA Icon
I have a database that is highly driven by macros. I have been working on rewriting the VBA where I know how. I ran the performance analyzer on a few macros and it said to use the convertto VB tool and I did that and it converted it to VB and I am not sure how to use the VB code for example where do I put it now or does it automatically use it?

For example I have a macro that is run as autoexec when the database opens, and others that run after a button on a form is clicked.

Should I just be copying the code into the correct object event like the click event, etc?
 

Programming with Access 2007

Programming with Access 2007 Icon
Macros in Access can be considered like a simplified programming language that can be used to increase the functionality of the data base. For example, it can enclose a macro to a command button in a form, so the macro is executed when clicking in the button. The macros contain actions that make tasks, like opening a report, executing a query or to close the data base. Almost all the operations of data bases that normally are made manually can automate by means of macros, thus saving time.
 

Basics to Advanced Tutorial

Basics to Advanced Tutorial Icon
These tutorials are in Adobe Acrobat PDF format. You can download them individually or as a set. To view the files, you need the Acrobat Reader, which Adobe provides at no charge. Topics included: Introduction to Microsoft Access, Tables, Relationships, Basic Queries Using QBE, Basic Queries using SQL, Creating Basic Forms, Parameter Queries, Advanced Forms, Action Queries,
An Introduction to Visual Basic, Event-Driven Programming Using Macros,
Subforms, Data Access Objects, Advanced Triggers, Combo Box Controls
 

Create a macro

Create a macro Icon
In Microsoft Office Access 2007, macros can be contained in macro objects (sometimes called standalone macros), or they can be embedded into the event properties of forms, reports, or controls. Embedded macros become part of the object or control in which they are embedded. Macro objects are visible in the Navigation Pane, under Macros; embedded macros are not.
 

What are Macros and how you design and use them

What are Macros and how you design and use them Icon
This week we'll discuss, for those of you unfamiliar with programming, one of the more conceptually complex aspects of Microsoft Access. We'll start with a discussion of events: what they are and how Access uses them. Then, we'll move on to a lengthy discussion of macros, including what they do and how you design and use them. TOC: Macros; Debugging;
Getting Fancy with Macros.
 

Improve Functionality with Macros

Improve Functionality with Macros Icon
Access 2007 readers knowledgeable in creating applications with wizards and macros can easily learn how to make their applications more professional using the power of VBA programming.
 

Delete macros after conversion to VBA?

Delete macros after conversion to VBA? Icon
I have a slooow Database. Everytime I go from one form to another (through buttons) it takes longer and longer as time goes (still developing database). So I tried converting my macros ( only bout 10 or so) into VBA through the setup they have on the wizard. My question is, now that I converted to VBA, can I delete the macros? If not then what is the point of converting to VBA other than more flexibility of programming.
 

MS Access 2013: Create a Macro

MS Access 2013: Create a Macro Icon
Microsoft Access provides the ability for you to create macros. A macro refers to a set of actions that can be run automatically, and on demand. Macros are usually configured to run whenever a particular event occurs. You specify what that event is when you create the macro. You could make a macro run when a user presses a certain key, or you could make a macro run everytime your database is opened.
 

Allow Code To Run . .

Allow Code To Run . . Icon
I would like to find a simple way to help my users enable their macros. I currently have a database that displays a form as soon as the database is opened. The issue is the form will not work unless Macros are enabled.

I would like to have a form with instructions on how to enable macros. Once the user open the database, if macros are enabled, the form with the instructions will be set to hide, and the regular form will be made visible.

In Excel there is a "Workbook" open event, is there such a thing in Access? Also, how can I prevent the user from accessing the Access optoins and changing the "Display Form" field?
 

VBA or Macros

VBA or Macros Icon
I am building my database base on a template I got off of the Microsoft Access Website and it includes a combination of embedded macros and event procedures, VBA.

At this point I am not having too much problem editing either to get what I need to done, but that does not mean that I understand either very well at this time. However I am really trying to think about this database from a macro point of view and do things the right way the first time and not just what works just for the moment. I want to plan for this database to be upscaleable and to probably work on a network which may mean that the backend will reside on an SQL server. I am trying to learn and understand VBA, which I will take any reference recommendations on, but at this point both VBA & Macros are just greek to me.

So the question is should I be trying to convert all of the embedded macros to VBA or visa versa? Or is everything OK the way it is and if it ain't broke don't fix? What are your