Reference control in OnOpen event

  • Thread starter Thread starter Debbie
  • Start date Start date
D

Debbie

Hello,
I have a field in my page footer called Duration. In the OnOpen event, I
would like to test the value in that field. The OnOpen event has the
following code:
If [Duration] > = 3 then
varCounter = varCounter +1
end If

When I run the report, I get the message "Runtime 2427 You entered an
expression that has no value."

How can I reference the Duration field? I've searched the forums and have
seen this syntax used. Any help is most appreciated. Thank you, Debbie
 
Debbie said:
Hello,
I have a field in my page footer called Duration. In the OnOpen
event, I would like to test the value in that field. The OnOpen
event has the following code:
If [Duration] > = 3 then
varCounter = varCounter +1
end If

When I run the report, I get the message "Runtime 2427 You entered an
expression that has no value."

How can I reference the Duration field? I've searched the forums
and have seen this syntax used. Any help is most appreciated. Thank
you, Debbie

Try the Load event instead of Open. Open is too soon for many data-centric
operations.
 
Rick,
Thanks so much, I put it in the OnActivate (OnLoad no longer an option) and
it worked. Thanks again,
Debbie

Rick Brandt said:
Debbie said:
Hello,
I have a field in my page footer called Duration. In the OnOpen
event, I would like to test the value in that field. The OnOpen
event has the following code:
If [Duration] > = 3 then
varCounter = varCounter +1
end If

When I run the report, I get the message "Runtime 2427 You entered an
expression that has no value."

How can I reference the Duration field? I've searched the forums
and have seen this syntax used. Any help is most appreciated. Thank
you, Debbie

Try the Load event instead of Open. Open is too soon for many data-centric
operations.
 
Back
Top