Re: What event to use for checking table values on a form when record is completed?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Jan 3, 6:30 pm, John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
On Thu, 3 Jan 2008 10:36:59 -0800 (PST), raylopez99 <raylope...@xxxxxxxxx>
wrote:

What event should I use to check values entered into a new record on a
form?  The easiest one for me is "On Click" for a particular textbox,
but it requires user input. For the form itself, from "AfterUpdate",
On Current and "Before Update" are candidate--which one?  Or are there
others?

Current fires the instant the user navigates to the record in question, before
they've made any changes. BeforeUpdate fires when the user has completed work
on a record and attempts to save it - e.g. closing the form, moving off the
record, moving to a subform, moving from a subform back to a mainform,
explicitly saving the record with Ctrl-Enter, etc. etc.  It has a Cancel
parameter so if you're doing validation, it's the one to use.

AfterUpdate (as the name implies) fires after the record has successfully been
written to disk.

Also I plan to use this structure: (StockSymbol is a field in the
table bound to the form)

Is there a control on the form with StockSymbol as its control source - a
combo box perhaps? If so, it would be best to reference the control rather
than the fieldname.

Yes, I discovered this myself about combo boxes. What I ended up
doing is putting the warming on BeforeUpdate.


(BT--you're fired.  And you won't get a favorable recommendation from
me for your next job).

<eeep!> Who's BT and what did he do!?


Nothing, he just is a flamer that sometimes posts on this board. I
fired him from replying to me!

RL
.



Relevant Pages

  • Re: What event to use for checking table values on a form when record is completed?
    ... Current fires the instant the user navigates to the record in question, ... on a record and attempts to save it - e.g. closing the form, moving off the ... record, moving to a subform, moving from a subform back to a mainform, ... Is there a control on the form with StockSymbol as its control source - a ...
    (microsoft.public.access.formscoding)
  • Re: Focusing a subform
    ... Have you tried requery before moving? ... clicked sometimes it focuses to the subform sometimes does not. ... message "Focus cannot move to the control". ...
    (microsoft.public.access.formscoding)
  • Re: Cascading MouseMove Events
    ... Moving the control under the mouse will cause a mouse move event I believe, ... event firing repeatedly with the changes I made but the second time it fires ... > Thank-you very much for your time Michael. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cant detect lost focus when moving to parent form
    ... There is a main form and a subform. ... There is a masked control that has to be filled before anything else. ... The On exist event cancel value will prevent moving off the control ... form will fire. ...
    (microsoft.public.access.modulesdaovba)
  • RE: SubForm to MainForm Navigation
    ... Moving from a control on a subform to one on the main form (or vice versa) ...
    (microsoft.public.access.forms)