Hello all,
I'm new to modules and having a problem with the code as outlined below. Basically if ProportionCircuitsFail is a text field (selected from a combo on a form) then the code doesn't work.
Alternatively, I have another module where the user selects a number from a combo on another form, which then goes into the module. This time everything works as expected, example below:
I hope I've explained this well enough. Can anyone help?
Thanks in advance!
Swifty
I'm new to modules and having a problem with the code as outlined below. Basically if ProportionCircuitsFail is a text field (selected from a combo on a form) then the code doesn't work.
Code:
Public Function LSS3(ProportionCircuitsFail As Single) As String
If ProportionCircuitsFail = ExampleA Then
LSS3 = "10.0"
ElseIf ProportionCircuitsFail = ExampleB Then
LSS3 = "11.9"
Alternatively, I have another module where the user selects a number from a combo on another form, which then goes into the module. This time everything works as expected, example below:
Code:
Public Function LSS2(ProportionELIFail As Single) As String
If ProportionELIFail = 1 Then
LSS2 = "10.0"
ElseIf ProportionELIFail = 2 Then
LSS2 = "11.9"
I hope I've explained this well enough. Can anyone help?
Thanks in advance!
Swifty