Event on each record

  • Thread starter Thread starter J S
  • Start date Start date
J

J S

I have a form that lists many records at once (I think thats called a
tabular form). Based on the values queried from the database I want to set
the value of a text label to "rented" or "not rented". This way the user
will know this piece of information as they modify these rows.

What event would I use to do this? I would have to be an event that fired
for each record in the detail section of a form, I since each record will
need to have separate values of "rented" or "not rented".

-J
 
I used this event but it doesn't quite do what I want it to.

When I use this trigger to set the rented field, it sets the value for all
rows in the detail.

So the result looks like this
apt# rented?
1 rented
2 rented

then when I naviagte to the second row (which has a value of not rented)
then the screen looks like this

apt# rented?
1 not rented
2 not rented

So it appears are though when ever the on current event code modifies the
value for the rented text box. It can only modify it for all detail records.
How can I modify its value based on the data in that row?
 
It is not the event that is the problem. Sorry, I completely overlooked the
fact that you said "text label" in your initial post. If this control is
unbound, then what you are seeing is normal behavior for your continuous
form.

Have you considered conditional formatting? There is a downloadable
database at: http://www.lebans.com/conditionalformatting.htm. In that
database is a form named "cusContinuous" in which the creator of the
database (MVP Stephen Lebans) causes an unbound box to reflect a different
color depending on values in the record. You may be able to use his
techniques to highlight your Not Rented rows in Red or something like that.
 
Back
Top