Re: using do loop to format text boxes

From: Phil (phil_at_discussion.microsoft.com)
Date: 11/27/04


Date: Sat, 27 Nov 2004 15:33:01 -0800

Thanks Ken that helped. One more question - what is the syntax if I want to
test the first character for a '_'? I again tried various combinations of
the "Left" function, but can't get the code right....

For example I tried:

if (Left(textbox & intx), 1) = "_") then.........

being within the "with" loop I can't get the syntax right.

Thanks again
Phil

"Ken Snell [MVP]" wrote:

> Generic code that you can modify:
>
> Dim lngI As Long
> For lngI = 1 To 5
> With Me.Controls("head" & lngI)
> .Width = MyValue
> .Left = MyValue
> End With
> Next lngI
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
>
> "Phil" <phil@discussion.microsoft.com> wrote in message
> news:E89792F2-F82B-4A51-AFBC-FBDF918B2499@microsoft.com...
> > HI,
> >
> > I have a report with 14 text boxes in the heading. I currently format the
> > text boxes using the .left and .width arguments to set the left edge and
> > width of each box. The boxes are named head1, head2, head3..... I would
> > like to do the formatting in a do loop, but I can't figure out how to
> > reference the text boxes. I tried using and interger variable "intx" with
> > the following code options for the .left argument and simular code for the
> > .width:
> > "head" & intx.left
> > ["head" & intx].left
> > [("head" & intx)].left
> > Plus others.....
> >
> > I always get a syntax error or a can't find field.
> >
> > I know that using the len function that len("head" + intx) will give me
> the
> > length of the data, but I can't figure out how to reference the .left or
> > .width arguments.
> >
> > Any help would be appreciated.
> > Thanks,
> > --
> > Phil
>
>
>



Relevant Pages

  • Preview chapter about the structured syntax definition of Seed7
    ... I am writing a chapter about the structured syntax definition ... will be used as base to explain the S7SSD. ... that a new statement, the 'loop' statement, should be defined. ... Priority and assoziativity ...
    (comp.compilers)
  • Re: Am I the only one who would love these extentions? - Python 3.0 proposals (long)
    ... Why is it nice enough to make it be a syntax addition, ... to point an image viewer/editor at a chunk of Python code. ... You argue consistancy to other keywords. ... Why is this new loop construct of yours useful enough ...
    (comp.lang.python)
  • Re: How about this syntactic candy?
    ... I can think of that's worse than adding a rarely needed, rarely beneficial syntax is adding one that actually allows one to lie to the compiler in a way that _breaks_ the code. ... But more significantly, IMHO, the reason that syntax has survived so many generations of this family of languages is that it's so commonly useful. ... simple for loop. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: PEP-315 ("do" loop)
    ... But it's syntax seems like an acquired taste to me. ... Would be defined to work exactly like a while loop except the test is not ... and my news client breaks the formatting. ... "improving" the basic while loop, none of which seem to be a natural ...
    (comp.lang.python)
  • Re: spurious wakeup
    ... It can be wrapped in a macro if you insist on ... > You must remember to repeat this loop at all places of the wait call ... checking of all values of variables which influence the predicate. ... > Templates are the safe syntax for a lot of macros. ...
    (comp.lang.cpp)

Quantcast