Hi Elena,
 
You may want to try something like this.  You have to remember that your arguement should looks something like this:
 
=IIF( condition, TRUE statement, FALSE statment)
 
In your case, you can say the following in a nested IIF statement,
 
=IIF([txt1] between 1 and 29, 1, IIF([txt1] between 30 and 59, 2))
 
You would put this in your control source for the txt2 text box.
 
I hope this helps.
 
Jose
 
 


Elena <[EMAIL PROTECTED]> wrote:
Hi. I would like to have a text box filled in based on the number
entered in another text box. The values are in a range format and I
don't know  how to write the IF, Then statement. This is what I tried
so far:

If txt1 >= "1" Then
txt2 = "1"
ElseIF txt1 >= "30" Then
txt2 = "2"
End If

It works to some extent but what I really want to do is to say:

"if txt1 is between 1 and 29 then txt2 = 1; if txt1 is between 30 and
59 then txt2 = 2"

I don't know how to write that or if it's possible. Any ideas?
Thanks.








Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to