John,
As an accomplished author and all around guru of Access, is there a reason you use 2007 instead of the new technology?
Jim Wagner
On Wednesday, October 23, 2013 11:43 AM, John Viescas <JohnV@msn.com> wrote:
Jim-
Sad to admit, but I still do most stuff in 2007, so I haven't really dug into Data Macros yet.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Jim Wagner
Sent: Wednesday, October 23, 2013 7:17 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Data Macros
Sent: Wednesday, October 23, 2013 7:17 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Data Macros
John,
That helps a lot. Do you use them? I have always programmed the forms to do that function.
Jim Wagner
On Wednesday, October 23, 2013 9:11 AM, John Viescas <JohnV@msn.com> wrote:
Jim-
Jeff Conrad does a good job of covering data macros in the 2010 Inside Out book. From page 363:
"Data macros are similar to triggers in Microsoft SQL Server because they allow you to attach business logic directly to table events. However, unlike triggers in SQL Server, data macros are not performed with a transactional context -- each operation is separate. Data macros respond to data modifications, so no matter how users edit data in the databse, Access enforces those rules. This means you can write business logic in one place, and all the data entry forms and Visual Basic code that update those tables inherit that logic from the data layer. Once you create a data macro for a table event, Access runs the data macro no matter how you change the data."
So, you can define a Data Macro for the update, insert or delete events directly in the table. This code is executed by the database engine no matter the source of the change to data in the table. Your rules are enforced even when the data is changed from table Datasheet view. You can also do cool things like send an email when a new schedule record gets added. Or send an email when an error occurs.
Does that help?
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of luvmymelody@yahoo.com
Sent: Wednesday, October 23, 2013 5:49 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Data Macros
Sent: Wednesday, October 23, 2013 5:49 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Data Macros
Hello all,
I am studying for my 2010 certification in Access and came across Data Macros. I have never used them. Has anyone else? I know they are like stored procedures is what I am told.
Thank You
Jim Wagner
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (5) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar