Results 1 to 3 of 3

Thread: A form is needed

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Illinois
    Posts
    27

    Unhappy

    I have a code that is suppose to do the following:
    You type a single number into the input box then you hit the plus key. This will make that number be added to what ever is in the display box. Then you type a new number into the input box and hit the plus key again and now this new number will be added to what is in the display box and the sum will again be put in the display box. You must use the if statement and the plus key does not show up on the form.

    Private Sub txtInputBox_KeyPress(KeyAscii As Integer)
    IfChr(KeyAscii)= "+" Then
    KeyAscii=0
    txtDisplayBox.Text = Val(txtDisplayBox.Text) + Val (txtinputbox.Text
    txtinputbox.Text = ""
    End If
    End Sub

    Now the code works!! but there is not way of telling the user to enter any numbers or no way of telling the user to press the plus key, and I'm not sure how to create the forms. Please help

    I'm a MICKEY FAN

  2. #2
    Guest
    Ummm... I'm a little confused.
    You said the above code worked, how did you test it if you don't have a form?

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'Here is a simple little way.
    
    Private Sub Form_Load()
      Dim msg
       msg = "Welcome to my little application." & vbcrlf
       msg = msg & "Simply enter info into the textboxes." &   vbcrlf
       msg = msg & "+ sign does bla bal" & vbcrlf
       msg = msg & "Surley, you get the message!"
      
    Msgbox msg,vbinformation,"My Application Rules"
    End sub
    Or you can just add labels with background set to transparant and put them above the textbox in question


    [Edited by HeSaidJoe on 09-27-2000 at 11:01 AM]
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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