Or - if you prefer to keep using the IIF expression, you could do this:
Basically, if you want to nest iif statements, just keep on adding new iif statements to the "else" part of the statement. The main thing you have to make sure you do, however, is to have an "else" statement right at the end ([returnvalue4] in the above example), and have the right amount of closing parentheses, which is easy to do: just count the number of times "iif" shows up in your expression, and put that many closing parentheses at the end (in my example, "iif" is in there 3 times, so there's 3 closing parentheses)
But, especially given that you're using this in a form, I would do as Mike says, and use a Select Case statement. You should only nest "iif" statements if you cant use Select Case statements.
But as a fallback, you should also always have a "Case Else" part in your statement, in case something odd happens, such as:
SELECT CASE me.txtFirstTextBox
Case 1 to 30
Me.txtSecondTextBox = 1
Case 21 to 60
Me.txtSecondTextBox = 2
'And so on
Me.txtSecondTextBox = -1
MsgBox "Oh no! something bad happened! Oh what a world"
I am a loud man with a very large hat. This means I am in charge
(Edited due to typo)