> "not working" does not tell us what is wrong. Details please.
>
> One thing I notice is that you are comparing a text field, so I'd compare it
> to a string. (Text140 = "1").
Yes. If text 140 is not filled in when you open the form, then the code
will do the "else" part.
If you are trying to do this in a brand new record, and you want it to
happen after the field is filled in, then you need to tell Access that. You
have told Access to look at the field ON OPEN and do the If statement.
Whatever is in that field when you open the form is what it will use.
I would think you would want the code in the CURRENT event so that as you
scroll through existing records, the field will appear and disapper. You
might also want the same code to run when TEXT140 is changed. Taht way if
the user changes it from "1" to something else, the fields will appear or
disappear.
A bigger issue might be to think about what happens if the field is changed.
Let's say I have a "1" in TEXT140, and I have values in TEXT87, TEXT89, and
TEXT91. If I change TEXT140 to a different entry, then those three fields
will be invisible, but they still have data in them. Don't you want to
clear that data as well? Based on the names, I'm thinking these are unbound
fields, so clearing the data may not matter.

Signature
Rick B
> > "not working" does not tell us what is wrong. Details please.
> >
[quoted text clipped - 5 lines]
> Thanks
> DS
DS - 03 Aug 2005 02:21 GMT
> Yes. If text 140 is not filled in when you open the form, then the code
> will do the "else" part.
[quoted text clipped - 16 lines]
> clear that data as well? Based on the names, I'm thinking these are unbound
> fields, so clearing the data may not matter.
Thanks Rick, Text140 doesn't change once I'm on form, so I just set it
from the previous form and that works fine...thank you for all of the
input and advice.
Sincerely,
DS