[AccessD] Validation of a control

Arthur Fuller fuller.artful at gmail.com
Thu Apr 24 06:13:13 CDT 2008


At last I found the problem on this issue, thanks to a second pair of eyes
(owned by my good friend and colleague Joe Michel). The problem is that when
grabbing the values from the extra columns from the initial dropdown, they
come in as strings. As soon as I wrapped them in Val() calls the code
suddenly worked as expected. I should have noticed this in the debugger
because hovering over them showed '123736' not 123736, but I missed this
detail. Once Joe pointed out the problem, it took all of 3 minutes to fix.

Moral of this story: sometimes a second pair of eyes can save you hours if
not days.

Arthur

On Wed, Apr 23, 2008 at 2:14 PM, Robert L. Stewart <robert at webedb.com>
wrote:

> 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



More information about the AccessD mailing list