[AccessD] Compiler doesn’t catch typos in Err?

Stuart McLachlan stuart at lexacorp.com.pg
Sat Jul 31 19:17:21 CDT 2021


No, it's true for any Access object:
This also compiles:

Dim f As Form
Debug.Print f.xxxxx



On 31 Jul 2021 at 13:19, Ryan W wrote:

> Is this just for Err?
> 
> I know I´ve had the compiler catch stuff like
> 
> rst.Field when I meant rst!Feild when working with recordsets. 
>> 
> 
> Sent from my iPhone
> 
> > On Jul 31, 2021, at 1:12 PM, Charlotte Foust
> > <charlotte.foust at gmail.com> wrote:
> > 
> > The dot operator assumes that whatever is typed after it is
> > meant.  If it doesn't find an object of that name, it assumes the
> > name is a variable and tries to work with it.
> > 
> > Charlotte Foust
> > (916) 206-4336
> > 
> > 
> >> On Sat, Jul 31, 2021 at 10:49 AM Ryan W <wrwehler at gmail.com> wrote:
> >> 
> >> Friday I spent an hour debugging my error handler for a function I
> >> wrote only to realize it was a typo in Err.Description (I typed
> >> Err.Decription) so when the Err handler fired it wasn´t firing
> >> for my expected trapped error but for the error that the typo
> >> produced once the code actually was executed.
> >> 
> >> The compiler never caught it. So I decided Err.andjdjskelfo was
> >> next. Nope. Didn´t catch it. It doesn´t seem to catch anything
> >> invalid you type after the dot? Unusual.
> >> 
> >> I tried this on two access 2013 installs. My machine 64-bit and a
> >> VM with the 32-bit version.
> >> 
> >> Is this a known bug? Am I the only one ?
> >> 
> >> 
> >> Sent from my iPhone
> >> --
> >> AccessD mailing list
> >> AccessD at databaseadvisors.com
> >> https://databaseadvisors.com/mailman/listinfo/accessd
> >> Website: http://www.databaseadvisors.com
> >> 
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list