CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2001
    Location
    CA
    Posts
    16

    working with variables/constants

    Hello Anyone!
    I would greatly appreciate if someone could start me off on as to what vbcode to use.
    I’m trying to create code to do the following on the below menu but I’m not so sure as to how to start…Can anyone provide an example ….
    I’m trying to validate the input data (Sales Amount) and ensure that it is numeric. If it is not, then I need display an error message using a message box.


    My Menu looks like this:

    File
    Pay ;ie Menu button
    Summary;ie Menu buton
    Vb GUI looks like this:
    Sales Amount [ ]
    Total Pay [ ]
    Commission [ ]
    If the Sales amount is about a certain quota;ie 500 then the sales person will not get a commission of (15%) commission + his base pay of 100.
    The (15%)com + his base pay should equal his total pay to be displayed on the above GUI. If quota is not met then only the basepay will be displayed.

    Also how do I display the Menu Summary button a message box, containing total sales, total commissions, and total pay for all sales inputted.Display the numbers with two decimal places and dollar signs.

    Many Thanks!





    Juan Amore

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: working with variables/constants

    Your data entry probably goes tot he text box. Before proceeding do the validation

    if IsNumeric(Text1.Text) then
    'do something
    else
    MsgbOx "Invalid entry"
    end if

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured