PDA

View Full Version : Setting a max for nPAC


Lee Carson
16th September 2004, 04:24.56 PM
I want the max nPAC returned from a PP field per horse. How do do this? I have nPAC in a field - I tried "Max" for the query no good. Also max(expr) no good. Help

Lee Carson
16th September 2004, 04:31.42 PM
Let me rephase this question.
I want to get a listing of every horse in the race with their max nPAC figure AND their last race nPAC figure.

Victor
16th September 2004, 05:15.10 PM
Sounds like HX-5 is in your future, along with a custom report.

MikeDee
16th September 2004, 09:24.53 PM
Lee Are you using hx5?


both of the numbers you want are there

item
91 "nPP1PAC" Pace Quirin Figure CURRENCY (or SINGLE)

This is the npac number for the last (most recent pp)


item
131 "nTOP_PAC" highest PAC figure out of PPs (last 10 PPs)

134 "nTOP_PAC_AGO" days ago the PAC top took place

there is a hx5 template available, you will want to import this table into your db then you cam import hx5 data into it

you can link the hx5 to the hx4 if you want to look at hx4 fields with the pac numbers

Lee Carson
17th September 2004, 09:50.24 AM
Yes I have HX3, HX4, and HX5 all imported and llinked. My difficulty is how to write the expression to find the max of each individual horse in a field (race) the HorsePAC is found in HX5 , lines 91-100 "nPP1PAC" thru "nPP10PAC". I think the expression is written in the Field line, something lilke MAX: max(nPAC,([nPP1PAC:nPP10PAC)) You are showing me a supershort cut as long as lines 131, and 134 are referring to the Horse pac and not the RACE PAC. and I can include this in the criteria line - and avoid a formula as I staarted out with for the field line?
Please respond
Lee

Lee Carson
17th September 2004, 10:54.13 AM
One more question, Please. Some time ago I imported to all of the three tables. Now, I have addidtional data to import. How do you know where you left off? the last record in each of the three tables? What is a good routine for importing additional data and avoid overwriting? Presently, I am enrolled in an Access class for 90 days, and together with the class, the teacher and you, Rick and Ken, I hope to become a very serious Access user.
I will sincerely appreciate your help along the way. I'm just jumping into the water to get started.
Thanks, Lee

Lee Carson
17th September 2004, 11:01.03 AM
Another one.
Is it necessary to set each of the 10 "nPP1PAC" in 10 different fields? or for that matter, any item where all 10 PP's are shown?
Lee

Rick
17th September 2004, 12:55.02 PM
Lee,

There is no right way to do it. You just need to figure out your way.

Some may do it daily, some weekly, some monthly and some when ever they get around to it.

First I would suggest looking through the old treads in this forum. You may have to open the forum, go to the bottom of the screen and change the from to “the beginning” to be able to see all the older threads. I know this has been touched on before.

Things to consider:

If the primary keys are set in each table it will not allow you to import duplicate records.

Erase your old export files before exporting again (in the same directory).

You need a working directory for race files that you have not got results for yet. You could set up something like C:\htr\Monday, C:\htr\Tuesday, etc. Then once you have all the results and charts for all the races in that folder just move all the files to your export folder. Or you could just do the export in your daily folder, move the ALL_HX#.txt files to the folder that your Import Macro points to and run the import. That way you keep overwriting your old ALL_HX#.txt files and don’t have to worry about deleting them.

You can then move your daily race files to the folder where you are saving files for backup. I do mine monthly. But then I am doing just about everything on a monthly basis.

Start with something that you think will work for you and just adjust it as you go along.

You need to backup/save all the old races with results and charts just in case you need them to rebuild your database. Next time km add a new field that you want to use you really need to go back and start a new database.