[AccessD] FW: Basic Question

artful at rogers.com artful at rogers.com
Thu Feb 22 11:20:02 CST 2007


I've used this technique quite a bit. What I typically do is create a procedure in the typical way, so that I obtain its parameters -- Cancel as int, etc. Then I take the code from the procedure and turn it into a function. The function uses the same parameter list. Once that is done, I can call the function as your friend shows below.

 
Arthur Fuller
Technical Writer, Data Modeler, SQL Sensei
Artful Databases Organization
www.artfulsoftware.com




----- Original Message ----
From: Rocky Smolin at Beach Access Software <rockysmolin at bchacc.com>
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Sent: Thursday, February 22, 2007 11:48:44 AM
Subject: [AccessD] FW: Basic Question


>From a colleague.  Any ideas on this?

TIA

Rocky


  _____  

From: Mike Dwyer [mailto:mike at aesadvantage.net] 
Sent: Thursday, February 22, 2007 12:13 AM
To: bheygood at abestsystems.com; Dixon; Barry Hynum; Bob_Heygood; Doug Murphy;
Ed Lance; Jackie Murphy; JKA Joe K Anderson; Rocky Smolin
Subject: Basic Question



Ok, this is Access 101 but I must be having a mental moment.



If I use a function instead of an event procedure for BeforeUpdate, can that
function return a value that cancels the update?



I have a form with 120 fields on it (lots of tabs).  I don't want 120 event
procedures for each BeforeUpdate and I don't want 120 event procedures for
AfterUpdate.  I would like to select all 120 fields and set the BeforeUpdate
property to something like =BeforeUpdate().  This works great for
AfterUpdate, however, when I set it for the BeforeUpdate property, returning
a value from this function doesn't cancel the edit.



Is this possible?




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/696 - Release Date: 2/21/2007
3:19 PM


-- 
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