Robert L. Stewart
robert at webedb.com
Wed Apr 23 13:14:59 CDT 2008
Arthur, I generally do not use the before-update event. I use the after-update or the on exit of the control to validate. I would have code that did something like IF EastValue < cbxRegion.column(2) or EastValue < cbxRegion.column(3) msgbox "Value entered for minimum is not between " & cbxRegion.column(2) & " and " & cbxRegion.column(3) me.EastValue.SetFocus END IF Robert At 12:00 PM 4/23/2008, you wrote: >Date: Wed, 23 Apr 2008 09:26:38 -0400 >From: "Arthur Fuller" <fuller.artful at gmail.com> >Subject: Re: [AccessD] Validation of a control >To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> >Message-ID: > <29f585dd0804230626t2b20baf9yba6cecd8e6fa795d at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >It appears that I cannot use the validation rules. I tried something almost >identical to what you wrote and I get a message telling me that I cannot set >a validation rule for a linked table. So instead I'm using the BeforeUpdate >method and something really funny is going on here. I edit a value that I >know is valid, and change it slightly, remaining well within the boundaries, >and Access tells me that the value is less than the permitted lower >boundary. Even though the number put in is only one different that the >existing value. If I then press Escape and restore the original value, >Access accepts it. Maybe that's because I haven't triggered the BeforeUpdate >code by doing that. Maybe I have to do the same thing in the OnExit code >too. > >Back to the drawing board.