Re: using do loop to format text boxes
From: Phil (phil_at_discussion.microsoft.com)
Date: 11/27/04
- Next message: Marshall Barton: "Re: In Access, force groups to print on different pages"
- Previous message: bozdog: "Re: Setting values in a text box"
- In reply to: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Next in thread: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Reply: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Messages sorted by: [ date ] [ thread ]
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
>
>
>
- Next message: Marshall Barton: "Re: In Access, force groups to print on different pages"
- Previous message: bozdog: "Re: Setting values in a text box"
- In reply to: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Next in thread: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Reply: Ken Snell [MVP]: "Re: using do loop to format text boxes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|