Text box based on form entry

P

Papa Jonah

I have a form with a subform.
I want the form to display a label or text box that says "Deleted" if my
delete checkbox is checked on the subform.
I also want the same label or text box to appear on a report that refers to
the same record.

Any thoughts would be most helpful
TIA
Papa
 
P

Papa Jonah

Marshall,
This doesn't seem to work. It doesn't seem to allow for the status of the
checkbox. Granted, I'm no expert, but it seems to say, if the checkbox then
"deleted".
What am I missing?
 
P

Papa Jonah

Marsh,
What I meant by "It doesn't seem to work" is that regardless of the "status"
of the checkbox (checked or unchecked) the text box doesn't change. My
inquiry about the status, although it may have been a stupid question, is
because I don't understand how the syntax works. My limited understanding is
why I posted the question in the first place. So thank you for explaining
how this statement works. I'm a little smarter now.
Now I guess I just need to better understand where your command needs to go.
I put it in the control source for the text box. The result was a blank
square in the middle of my form that never changes in spite of the status of
the checkbox in my subform.
Specifically, this is what I am using:
=IIf([sfrmMeasureChanges].[Form].[cbxdeleted],"Deleted")
I also tried putting the same thing in the Before Update event. Same result.

Thanks for trying to help. I'm trying to get smarter.
Papa

Marshall Barton said:
I don't understand what you mean by:
"It doesn't seem to allow for the status
of the checkbox."

A check box value should be either True or False and the IIf
condition looks at the value and returns "Deleted" if that
value is True or Null if the value is False.

What information is:
"This doesn't seem to work."
supposed to provide beyond the fact that you don't like the
result?
--
Marsh
MVP [MS Access]


Papa said:
This doesn't seem to work. It doesn't seem to allow for the status of the
checkbox. Granted, I'm no expert, but it seems to say, if the checkbox then
"deleted".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top