D
dan
I have a table with a list of clubs and their members and
the times that they have attended, e.g.
membername
clubname
date
timearr
timedep
given a couple of records eg.
dan,cluba,7/8/03,09:00,12:00
dan,cluba,8/8/03,14:00,17:00
I want to produce a report as follows:
"member name" "club name" "total hours"
dan cluba 6
Where "total hours" is the aggregation of times spent at
the club by the member.
I have a query for the report that returns the above
records. I then trap the Details Format event.
I can easily stop "dan" appearing in the report twice, by
detecting duplicate rows and adding the code:
Me.NextRecord = True
Me.PrintSection = False
Me.MoveLayout = False
However, I want to dynamically set the "total hours" field.
I can fairly easily store the running total in a local
variable but it's the actual setting of the correct field
that's the problem.
In the event procedure I have access to the current
record's controls (text boxes for each field), however
it's not the current record's controls that I need, it's
the previously written record's. I've tried storing the
previously written record's text box in a private
TextObject type vartiable but when I try to write to its
Text property, I get a message saying that I can't write
to it because it hasn't got focus!! I could try giving it
focus, and I will after I've sent this, but that seems
like a hack (and it may not work anyway!!).
Can you help??? Basically I need to know how to write to
the previously written (not read) record's fields.
Cheers,
Dan.
the times that they have attended, e.g.
membername
clubname
date
timearr
timedep
given a couple of records eg.
dan,cluba,7/8/03,09:00,12:00
dan,cluba,8/8/03,14:00,17:00
I want to produce a report as follows:
"member name" "club name" "total hours"
dan cluba 6
Where "total hours" is the aggregation of times spent at
the club by the member.
I have a query for the report that returns the above
records. I then trap the Details Format event.
I can easily stop "dan" appearing in the report twice, by
detecting duplicate rows and adding the code:
Me.NextRecord = True
Me.PrintSection = False
Me.MoveLayout = False
However, I want to dynamically set the "total hours" field.
I can fairly easily store the running total in a local
variable but it's the actual setting of the correct field
that's the problem.
In the event procedure I have access to the current
record's controls (text boxes for each field), however
it's not the current record's controls that I need, it's
the previously written record's. I've tried storing the
previously written record's text box in a private
TextObject type vartiable but when I try to write to its
Text property, I get a message saying that I can't write
to it because it hasn't got focus!! I could try giving it
focus, and I will after I've sent this, but that seems
like a hack (and it may not work anyway!!).
Can you help??? Basically I need to know how to write to
the previously written (not read) record's fields.
Cheers,
Dan.