Thanks for the reply Peter, but I had forgotten to mention that my
form is in continuous mode, so using that bit of code would cause all
the visible records to display the same icon. If I have 5 records
showing, and I move into a "deleted" record, the "deleted icon" will
show up on all 5 records regardless of whether or not the other 4
records were "deleted".
I did stumble across a possible solution shortly after I posted though
(don't you just hate it when that happens?):
http://www.mvps.org/access/forms/frm0024.htm
This provides an alternative to conditional formatting that allows you
to customize text displays depending on a stored or queried boolean
value (i.e. a yes / no field).
This should solve my original problem, but I have an alternative
question then: what if I want the current record to be highlighted
with a rectangle around the border?
Here is the rationale of why I want this -- the continuous form that I
mentioned has buttons at the header that perform operations based on
the current record. But when I manipulate the controls in the header,
the current record loses focus, and it becomes difficult to see which
record you are about to affect. I would like the current record to
remain "highlighte d" even when it has lost focus. I wanted to do this
by setting the rectangle's visible proper via the onGotFocus and
onLostFocus events, but changing the rectangle's properties has a
global effect on all such rectangles on each record. Is there anyway
to get around this?
Sorry about my lack of foresight and my long post. Thanks for any
input on this.
Alan
pr******@russel lscott.co.uk (Peter Russell) wrote in message news:<me******* *************** *@russellscott. btinternet.com> ...
I assume you have a checkbox or something like that to flag the recorded
as deleted (called say, chkDeleted) ?
Put an extra label control with a caption of 'Deleted', formatted as you
wish (Size,Colour etc) called say, lblDeleted.
When your checkbox or whatever is updated use the AfterUpdate event
procedure to make the label Visible or Invisible.
To get to the event procedure, right click the control and display
Properties, then show Event Properties. Click into the AfterUpdate event
property. On the dropdown list choose 'Event Procedure' then click the
build button (...) to the right of the event proerty box.
if me.chkDeleted = true then
me.lblDeleted.v isible = true
else
me.lblDeleted.v isible = false
end if
You will also need to put the same code into the On Current event
procedure for the form.
Regards
Peter Russell