[thelist] VB syntax help
Jon Haworth
jhaworth at witanjardine.co.uk
Tue Jul 30 10:15:00 CDT 2002
Hi Darren,
> You can't reference the property or method for a
> control unless the control has the focus.
> in debug this line is highlighted.
>
> lngFirstNumber = Val(Me.FirstNumber.Text)
OK, that thoroughly threw me... I checked in Access, it turns out you don't
need the .Text property at the end.
This works (I've tested it):
lngFirstNumber = Val(Me.FirstNumber)
It's a bit wierd - in straight VB you can specify the .Text property or
leave it blank (in which case you get the default property, which in this
case is .Text anyway). I have no clue why you can't do this in Access.
Cheers
Jon
More information about the thelist
mailing list