Home All Groups Group Topic Archive Search About
Author
24 Jan 2006 4:31 AM
ken
Hi,
I have another dumb newbe question. I tried looking in the help but,
maybe I'm using the wrong search criteria. Oh well. My question is
this. I would like to add the value of  txtTimer1.Text to the end of
my label text. What happens now is the text will scroll off the form.
For example the txtTimer1.Text returns 1. 2. 3. 4. 5... etc.  What I
would like is after a value is returned it displays that value only
and not a sequence of values. I would like to truncate to 1's, 10's,
and 100's. Can someone point me in the right direction. Thanks.
Regards,
Ken

frmKDMmain.lblFueltankquantity.Text = _
        frmKDMmain.lblFueltankquantity.Text & " " & _
        txtTimer1.Text

Author
24 Jan 2006 5:30 AM
Issy
I'm not sure if I'm following you, but if I am this is what I would do.  If
you know how long your initial label (say 15 characters long) you can
Left$(label.text, 15) & space(2) & txtTime1.text.  This would keep writing
over the old txtTime1.text information. 
  Otherwise, if you don't know how long.  Move the length in a variable at
start.
Dim iLen as integer
iLen = Len(label.text)

Then move your timer text
label.text = Left$(label.caption, iLen) & space(2) & txtTime1.text


--
Issy


Show quoteHide quote
"ken" wrote:

> Hi,
> I have another dumb newbe question. I tried looking in the help but,
> maybe I'm using the wrong search criteria. Oh well. My question is
> this. I would like to add the value of  txtTimer1.Text to the end of
> my label text. What happens now is the text will scroll off the form.
> For example the txtTimer1.Text returns 1. 2. 3. 4. 5... etc.  What I
> would like is after a value is returned it displays that value only
> and not a sequence of values. I would like to truncate to 1's, 10's,
> and 100's. Can someone point me in the right direction. Thanks.
> Regards,
> Ken
>
> frmKDMmain.lblFueltankquantity.Text = _
>         frmKDMmain.lblFueltankquantity.Text & " " & _
>         txtTimer1.Text
>
>
>
Author
24 Jan 2006 5:48 AM
ken
Hi Issy,
This is what's being displayed on the form: Fuel tank quantity 0
gallons 1 gallons 2 gallons 3 gallons 4 gallons  etc. across the form
When I want  Fuel tank quantity # gallons were # is updated with the
new value and "gallons" is fix on the form
Ken
On Mon, 23 Jan 2006 21:30:02 -0800, "Issy"
<I***@discussions.microsoft.com> wrote:

Show quoteHide quote
>I'm not sure if I'm following you, but if I am this is what I would do.  If
>you know how long your initial label (say 15 characters long) you can
>Left$(label.text, 15) & space(2) & txtTime1.text.  This would keep writing
>over the old txtTime1.text information. 
>  Otherwise, if you don't know how long.  Move the length in a variable at
>start.
> Dim iLen as integer
> iLen = Len(label.text)
>
>Then move your timer text
>label.text = Left$(label.caption, iLen) & space(2) & txtTime1.text
>
>
Author
24 Jan 2006 1:03 PM
Andrew Morton
ken wrote:
> Hi Issy,
> This is what's being displayed on the form: Fuel tank quantity 0
> gallons 1 gallons 2 gallons 3 gallons 4 gallons  etc. across the form
> When I want  Fuel tank quantity # gallons were # is updated with the
> new value and "gallons" is fix on the form

frmKDMmain.lblFueltankquantity.Text = _
        "Fuel tank quantity " &_
        txtTimer1.Text &_
        " gallons"

Andrew
Author
24 Jan 2006 4:33 PM
ken
Hi Andrew,
That did it. Thanks for the help.
Ken

On Tue, 24 Jan 2006 13:03:55 -0000, "Andrew Morton"
<a**@in-press.co.uk.invalid> wrote:

Show quoteHide quote
>Andrew