[AccessD] Validation of a control

jwcolby jwcolby at colbyconsulting.com
Thu Apr 24 07:35:20 CDT 2008


Arthur,

You are precisely correct, which is why this group serves such a 
valuable service and also why this group has its limitations.  Those of 
us who work alone in our home offices simply cannot get that "second 
pair of eyes".  The best we can do is post as much detail as we can to 
this group (and others) to see if a group member can find something in 
the code itself.

Arthur Fuller wrote:
> 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

-- 
John W. Colby
www.ColbyConsulting.com



More information about the AccessD mailing list