View Single Post
  #4  
Old May 18th, 2010, 04:39 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How to run event on other options

On Tue, 18 May 2010 06:36:01 -0700, Mommybear
wrote:

The fields in the form are bound, however, I have other fields that are not
on the form that default to a value, are calculated, being formatted to write
all caps, or go thru an if statement to determine value that are being
populated thru this Event procedure. The save button works great, however, I
don't know what is best in terms of handling the autosave when you tab or
enter past the last field on the screen. Do I duplicate the code or is there
a command that I could use to force this thru the save button code.


I'm not absolutely sure what is going on here - it sounds like you're
(unwisely) storing derived or calculated data?

In any case, the Form's BeforeUpdate event fires whenever and however it
completes a record and starts to write it to disk. You might want to move your
code from the button event to the BeforeUpdate event (which will be triggered
when your Save button does its thing).
--

John W. Vinson [MVP]