[AccessD] Form Validation
Stuart McLachlan
stuart at lexacorp.com.pg
Sat Oct 29 20:01:58 CDT 2022
Even vbWhite won't work as a varchar(). That is a predefined NUMERIC constant in VBA.
You can't store that as a string and pass the string to BackColor.
Me("txtTest").Backcolor = "vbWhite" still has the same problem of trying to pass a string to
numeric property.
You have to pass an actual number to .Backcolor
On 29 Oct 2022 at 19:38, Ryan W wrote:
> Err, yes I meant vbWhite, not just White. So since that limits me to
> just constants I'll have to go with LONG as you suggested if I want a
> larger color palette.
>
>
>
> On Sat, Oct 29, 2022 at 7:35 PM Stuart McLachlan
> <stuart at lexacorp.com.pg> wrote:
>
> > On 29 Oct 2022 at 19:06, Ryan W wrote:
> >
> > > VarChar was to be able use string literals such as "White" as well
> > > as maybe the #FFF style color codes, rather than RGB(0,0,0) style.
> > > This
> >
> > Won't work.
> >
> > Me("txtTest").Backcolor = "White" will just give youa Runtime Error
> > 13 - Type Mismatch. so will Me("txtTest").Backcolor = "#FFFFFF"
> >
> > The Backcolor property of a control is a LONG.
> >
> > You can use
> > Me("txtTest").Backcolor = &HFFFFFF
> > or
> > Me("txtTest").Backcolor = vbWhite
> > or
> > Me("txtTest") = 16777215
> > because they are all numbers but you can't use a string (variable
> > or literal)
> >
> >
> > --
> > 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