Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2009

    Red face Unanswered: Help needed in creating user form

    Hey Guyz
    I am quite new in Visual basic and i have to submit my assignment before 8 am on monday and i have no idea what to do

    I have been asked to Attach a subroutine to each button that puts the largest value from A, B or C into the result textbox using the statement or method indicated on the label.

    Below are the label which are on the form :

    a. Use and if/then/else statement block

    b. Use select/case

    c. Use the choose function

    d. Use the IIF function.

    Can anyone please please please please help me in detail ????

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    so what have you tried so far.
    after all its your homework,not mine/ours
    to start off with do you understand how those functions work, if not then try the help system
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 14
    In other words, you need to find the maximum value among three variables A, B and C and assign this max. to a TextBox.

    An easy solution, though not a very efficient one, consists in comparing each value with the two others:
    If (A > B) And (A > C) Then
        Max = A
    ElseIf (B > A) And (B > C) Then
        Max = B
        ' If Max is not A and Max is not B then Max must be C
        ' (equality does not matter here).
        Max = C
    End If
    This can be easily transposed to the different comparison methods (Select Case, Choose etc.). For better ways of performing such operations, you can google "sorting algorithms".
    Have a nice day!

  4. #4
    Join Date
    Oct 2009
    @ healdem
    i know its mine homework and i also mentioned that i am so bad in visual basic, thats why i am looking for help. Please dont turn your face off

    @ Sinndho
    thanks a is working, please help me in other two labels also...please its a request....plzplz

  5. #5
    Join Date
    Nov 2007
    Adelaide, South Australia
    Should you not have approached your assignment a little earlier that now ?

    Why didn't you?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    so what actually does your question have to do with databases?
    what efforts have you made. generaly homework questions don't get answered here, and when they do its after the OP (original poster) has made a good effort, but is sticking on one or two areas.

    it would be unusual to get a solution, especially if you have made no effort.

    so what have you tried
    what have you attempted
    what are you sticking on.

    what attempts have you made to understand what you are required to do.
    what attempts have you made to use say the help system to learn what you need to do

    what do your lesson notes tell you that you should be using
    as an alternative you could put the functions that you are expected to use into Google, prefixed with MS Access

    MS Access Choose function
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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