Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

field value replacement loop

Status
Not open for further replies.

dpizac

Technical User
Nov 23, 2007
2
US
I used to do PAL before ObjectPal many many years ago. I still use native Paradox for basic database needs. My wife has given me a project -- to tabulate points accumulated by high school swimmers and get the average for each. Simple task. However, the information is in a spreadsheet where the swimmer's name is in a column/row field with the swim points for each race are in rows underneath without the swimmer's name -- grouping.
Normally, if the list was short, I could just use Ctrl-D to copy the person's name to the rows underneath. But I have over a hundred names and over 3,500 records.
I want to write a script that will check the name field, if there is a name there, copy it to a variable, go to the next record and paste it into the field that has either a Y or is blank. Then go down to the next record, do an if/then check and keep looping until the end of the file when each time it encounters a name, the variable changes for the next paste.
The db file name is swim. The three fields in it are points, name and race.
Could someone help me? It has been so long and I've drawn a blank on doing it.
Once I get all the names on the same row with the points/races, I can then do a query and report to produce what my wife needs. It is getting the names on each line that I need assistance with.

 
FYI, I figured out how to do it. It took me about 9 hours, but the code works
 
dpizac,

Just scanning questions and noticed this one. Good to hear that you have solved it. If you ever have anything similar I suggested a solution for Pharmer a bit back. It is at thread177-1271223 titled 'Want to substitute a blank field ditto?'

I hope that this helps.

Regards

Bytander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top