detail section event trigger????

  • Thread starter Thread starter Access
  • Start date Start date
A

Access

HI

In my detail section I have [time] and [expired]. So there are a 100 records
so 100 rows of [time] and [expired].

So when [time] goes negative, I want the [expired] field to update itself to
TRUE. I have the formula I need but I can't find a place to put it and have
it trigger after each Detail Row is generated.

Can anyone help? Thanks
 
Access said:
HI

In my detail section I have [time] and [expired]. So there are a 100 records
so 100 rows of [time] and [expired].

So when [time] goes negative, I want the [expired] field to update itself to
TRUE. I have the formula I need but I can't find a place to put it and have
it trigger after each Detail Row is generated.

You don't need an event. Just use an expression as the ControlSource.

=IIf([time]<0,"TRUE","")
 
I tried something like that but the problem is is that the [Epired] field
does not get updated in the table. Any more help will still be appreciated.

Thanks


Rick Brandt said:
Access said:
HI

In my detail section I have [time] and [expired]. So there are a 100 records
so 100 rows of [time] and [expired].

So when [time] goes negative, I want the [expired] field to update
itself
to
TRUE. I have the formula I need but I can't find a place to put it and have
it trigger after each Detail Row is generated.

You don't need an event. Just use an expression as the ControlSource.

=IIf([time]<0,"TRUE","")
 
Access said:
I tried something like that but the problem is is that the [Epired] field
does not get updated in the table. Any more help will still be
appreciated.

I'm sorry, you're trying to use the running of a report to update a table?
I don't understand that. Perhaps if you explained exactly what you're
trying to accomplish.
 
Yes you could say I'm trying to update a table when the Form is begin
generated. My Form is a continuous form with [Time] , [TimeRemaining] and
[Expired] as the fields.

TimeRemaining is really a function which computes Now() - [time] to give you
the Time Remaining before the time expires so it is different each time the
Form is refreshed.

So instead of manually having to check the Expired Check Box for each record
that has expired, I was trying to find a way to do it automatically.

If updating the Table while creating the form is not possible, can you think
of a way to not show the records that have expired. Since [Time Remaining]
is being computed I can just quiry those records out and I can't find an
event trigger that would do it either.

Thanks for all the help.




Rick Brandt said:
Access said:
I tried something like that but the problem is is that the [Epired] field
does not get updated in the table. Any more help will still be
appreciated.

I'm sorry, you're trying to use the running of a report to update a table?
I don't understand that. Perhaps if you explained exactly what you're
trying to accomplish.
 
Access said:
Yes you could say I'm trying to update a table when the Form is begin
generated. My Form is a continuous form with [Time] , [TimeRemaining] and
[Expired] as the fields.

TimeRemaining is really a function which computes Now() - [time] to give you
the Time Remaining before the time expires so it is different each time the
Form is refreshed.

So instead of manually having to check the Expired Check Box for each record
that has expired, I was trying to find a way to do it automatically.

If updating the Table while creating the form is not possible, can you think
of a way to not show the records that have expired. Since [Time Remaining]
is being computed I can just quiry those records out and I can't find an
event trigger that would do it either.

Thanks for all the help.

Ok, I now see that you are talking about the detail section of a form, not a
report.

Your [Expired] field is not necessary at all and should be eliminated. It is
not good design to store that which can be easily calculated. If you want to
filter out records that have expired just use a criteria of <Now() against your
[time] field.
 
You are the MAN. Works Great. Thanks.




Rick Brandt said:
Access said:
Yes you could say I'm trying to update a table when the Form is begin
generated. My Form is a continuous form with [Time] , [TimeRemaining] and
[Expired] as the fields.

TimeRemaining is really a function which computes Now() - [time] to give you
the Time Remaining before the time expires so it is different each time the
Form is refreshed.

So instead of manually having to check the Expired Check Box for each record
that has expired, I was trying to find a way to do it automatically.

If updating the Table while creating the form is not possible, can you think
of a way to not show the records that have expired. Since [Time Remaining]
is being computed I can just quiry those records out and I can't find an
event trigger that would do it either.

Thanks for all the help.

Ok, I now see that you are talking about the detail section of a form, not a
report.

Your [Expired] field is not necessary at all and should be eliminated. It is
not good design to store that which can be easily calculated. If you want to
filter out records that have expired just use a criteria of <Now() against your
[time] field.
 
Back
Top