Forms are very different than reports, and have different events.
The Current event of the form fires when a record becomes current. But if
this is a continuous form or datasheet, you will not be able to use code in
this event: all rows will change, not just the current row.
Instead, use Condtional Formatting.
(This assumes Access 2000 or later.)
Open the form in design view.
Select the text box that should change color.
Choose Conditional Formatting on the Format menu.
Set Condition 1 to:
Expression ([MyBoolean])
and click the red text.
Use the name of your boolean field instead of MyBoolean.
(Note that True is -1 rather than 1 if you are talking about a yes/no field
in an Access table.)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Domac" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I would like to set foreground color of textbox on subform depending on
> value of booleann field.
> Problem is that i can't catch event Detail_format that i used when doing
> same task on report.
>
> If value is 1 then color of textbox is red if it is 0 then color is black.
>
> Subform is in continuos form view and I can't get detail_format event !!??
>
> Please help!
> Domagoj