Hi everyone,
could you please help me. i have a combo box that have the values "1st month", "2nd month" etc, a text box to put details such as weight, length and ccirc. what i want to do is when a user inputs the details and click a button, the text box wres, lres and ccircres will show the results such as "high", "low" or "normal". i tried the following code in the on click event of the button but it wont show anything...
*its up to 12th months but the code is the same
could you please help me. i have a combo box that have the values "1st month", "2nd month" etc, a text box to put details such as weight, length and ccirc. what i want to do is when a user inputs the details and click a button, the text box wres, lres and ccircres will show the results such as "high", "low" or "normal". i tried the following code in the on click event of the button but it wont show anything...
Code:
Private Sub Command24_Click() Select Case Me.age Case "1st month" ' declares variables If weight <= 2.96 Then wres = "low" ElseIf weight >= 4.93 Then wres = "high" Else wres = "Normal" End If If length <= 49.1 Then lres = "short" ElseIf length >= 57 Then wres = "long" Else lres = "Normal" End If If hcircres <= 34.1 Then wres = "small" ElseIf hcircres >= 38.4 Then wres = "big" Else hcircres = "Normal" End If End Select Select Case Me.age Case "2nd month" ' declares variables If Me.[weight] <= 3.57 Then wres = "low" ElseIf Me.[weight] >= 5.84 Then wres = "high" Else wres = "Normal" End If If Me.[length] <= 52.1 Then lres = "short" ElseIf Me.[length] >= 60.3 Then wres = "long" Else lres = "Normal" End If If Me.[hcircres] <= 35.7 Then wres = "small" ElseIf Me.[hcircres] >= 39.8 Then wres = "big" Else hcircres = "Normal" End If End Select
Comment