Add text to a previous record

echorley

Registered User.
Local time
Today, 16:56
Joined
Mar 11, 2003
Messages
131
In my football statistics database, I need to be able to add text from a current field to text in the previous record. For example:

If a team scores a touchdown, then I have it coded to describe what happened:

If Me.Score_Type_Description = "Rushing Touchdown" Then describe = "#" & Me.Player_Scored_Number & " " & Me.Player_Scored & " " & Me.Yards_Gained & " yd Touchdown Run."

This description is added to the table and we move on to Special Teams. If the kick is good or no good, another description is generated:

If Me.Score_Type_Description = "Extra Point" Then describe = "Extra Point by #" & Me.Player_Scored_Number & " " & Me.Player_Scored & "."

Now, I need to be able to connect these two descriptions so they are basically the same sentence. So it might read:

#27 SCOTT 1 yd Touchdown Run. (Extra Point by #54 KNOODLE.)

I would like to store it in the previous record, because that is where I have other information stored (time on the clock, time of possession, plays, yards, etc.) when the touchdown was scored.

I probably could move all that ( information time on the clock, time of possession, plays, yards, etc.) over to the record with the special teams and then use DLast (and a query) to retrieve the touchdown description.

Any quick and easy ideas or should I charge ahead with duplicating the touchdown information onto special teams information?

Thanks!!
 
I totally understand this and knew it would be coming. I did use your advice from another post and created a query of the table so that the plays are in sequence according to the time and quarter they are scored in.

I then look up the previous row in the query (that contains the touchdown information) and want to add to that previous row information for the conversion. None of the data is changing except for a description string of who scored, how many yards, etc. My goal is to have a description that reads as follows in a report:

#27 SCOTT 1 yd Touchdown Run. (Extra Point by #54 KNOODLE.)

The first part (before the parenthesis) is the Touchdown description and the part in parenthesis is the Conversion. Right now they are in seperate rows as scoring descriptions. I need them on the same line when I generate the report. My thought process was to add the part in parenthesis to the previous description which makes it easy to run the report.
 

Users who are viewing this thread

Back
Top Bottom