Re: BeforeUpdate or AfterUpdate?
From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 10/18/04
- Next message: LT Consulting: "How do I prevent back color from printing on a form?"
- Previous message: Ed: "Re: Count Records in Listbox"
- In reply to: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Next in thread: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Reply: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 18 Oct 2004 15:21:16 -0400
"Gary Schuldt" <garyschuldt@comcast.net> wrote in message
news:O8wqHiTtEHA.2864@TK2MSFTNGP09.phx.gbl
> Thanks, Dirk.
>
> It seems to me, though, that capitalization is an example of
> "automated" validation and could be easily considered a BeforeUpdate
> process.
>From my point of view, it's not validation, since there's no plan to
reject the data entered by the user and keep the focus in the control.
> As I understand the AfterUpdate event, it is raised after the value
> in the control is copied from the Control Buffer to the Record
> Buffer. Wouldn't you want to logically "fix up" a value before it
> was copied rather than after?
I believe you're right about the sequence of events, but it seems to me
that it makes no difference. The value is going to be (a) modified in
the control buffer, (b) copied to the record buffer, and (c) modified by
the code. Although nothing can happen until action (a) is taken, does
it really matter whether the remaining actions proceed (b), (c) or (c),
(b)?
So to me, the only significant difference between the events is whether
my code might choose to keep the focus in the control. That's why I use
the events the way I do.
> I'm trying to become a more "intuitive" Access programmer rather than
> trying to keep a bunch of rules and conventions in my poor ol' head!
That's good. As I said, it doesn't really matter in this case. If you
arrive at a convention that makes sense to *you*, that's to your
benefit.
-- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup)
- Next message: LT Consulting: "How do I prevent back color from printing on a form?"
- Previous message: Ed: "Re: Count Records in Listbox"
- In reply to: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Next in thread: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Reply: Gary Schuldt: "Re: BeforeUpdate or AfterUpdate?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|