if statement in control source

lipin

Registered User.
Local time
Today, 23:13
Joined
May 21, 2002
Messages
149
Hey, I have a text box on the detail line with control source as: =+1 the running sum is set to Over Group to increment

so if there are four records in the group it looks like:

..............................1
..............................2
..............................3
..............................4 well I need it to show a one only for the first record of each group and zeroes to follow, like this:
..............................1
..............................0
..............................0
..............................0 so is there a way to do this in the control source to say something like:
=1; unless >1 then display "0"

Thanks a lot.
 
lipin,

I don't know how that would be done in a query.

In the report, you could add an invisible textbox.

In the "Report_on_open" event, initialize it to "".

In the detail_on_format event you can check to see if the group
has changed.

If it has then set your unbound txtbox to 1 and store the new
value in the invisible textbox.

If it hasn't then set your unbound txtbox to 0.

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom