Results 1 to 2 of 2

Thread: UpDown control

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    1

    Talking UpDown control

    I´m having a trouble using UpDown control (Active X).
    I have a textbox as a buddy to my control and set the increment to 1000.
    Problem is that, if the user enters a number in my textbox ex. 1 and I
    click my control to increment the number with 1000. The result isn´t 1000
    which I want it to be, the result in my textbox is 2000.
    Understand my problem ???
    My code is very easy:
    txtPoUt.Text = scrPoUt.Value

    / Fredrik

  2. #2
    New Member
    Join Date
    Mar 2002
    Posts
    8
    Hi Fredrik.

    Try setting the syncbuddy property to false, then writing your own event code for when the user clicks up or down:

    Private Sub scrPoUt_DownClick()

    txtPoUt.Text = CStr(Val(txtPoUt.Text) - scrPoUt.Increment)

    End Sub

    Private Sub scrPoUt_UpClick()

    txtPoUt.Text = CStr(Val(txtPoUt.Text) + scrPoUt.Increment)

    End Sub

    Kevin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width