Retrieve the current value then make static (1 Viewer)

Fergge

Registered User.
Local time
Today, 02:43
Joined
Apr 15, 2014
Messages
14
I have a query that sorts data from a weigh in table and returns a single result per player based on some date and time criteria. The returned result is then used in a comparison the next time a player weighs in to determine a recovery score. Since the data from the query is based on information from the weigh in table, when I have the form run a refresh function to place the current weight in the weigh in table, it updates the query and thus returns a recent that is identical to the current. Is there a way to have the form pull only the value from the recent query and not update when a refresh is ran? In the end, I would like to create a new table called recovery where the players ID, recent weight (the one used for comparison not the new one generated), current weight, dates and recovery score are stored.
 

MarkK

bit cruncher
Local time
Yesterday, 23:43
Joined
Mar 17, 2004
Messages
8,179
After reading your post it's not clear to me how to help. One thing I can say is that I would not store what you call "current results." Data should be stored in it's simplest form only, and any assessment that data is 'current' must a function of it being compared to a date, but time is never static. What if no one opens your database for two weeks. Will your data stored as "current results" still be current?
 

Fergge

Registered User.
Local time
Today, 02:43
Joined
Apr 15, 2014
Messages
14
My apologies for the confusion. When I used the phrase current I was speaking of the number I am currently entering at the weigh in. I need to do a comparison using the weigh in currently being conducted vs a previous weigh in that is already stored in the "WeighIn" table. I guess if I could just build an expression to compare the two numbers then I would not need any of the extra tables, but my attempts to do so have failed due to too many variables.
 

MarkK

bit cruncher
Local time
Yesterday, 23:43
Joined
Mar 17, 2004
Messages
8,179
But your weigh-ins have a time dimension, right? So you should be able to query that data with a where clause something like...
Code:
...
WHERE WeighInDate <= Date() - 1 AND PlayerID = 12
...
...so for Player 12, that'll show weigh-in data up to yesterday, and those results will not change if you refresh or update player 12's weigh-in data for today. Does that start to address the kind of problem you are working with? You haven't shown any code or SQL so we are just guessing.
 

Fergge

Registered User.
Local time
Today, 02:43
Joined
Apr 15, 2014
Messages
14
Mark,

You are headed in the right direction. My issue is that players weigh in multiple times per day, and each weigh in needs to be compared to the previous weigh in that was the first weigh in of the day. The first weigh in of each day must be compared to the previous first weigh in of the day, and each subsequent weigh in for the day will be compared to the first weigh in of today. We typically do not weigh in on Saturday's or Sunday's so Mondays first weigh in of the day will need to compare back to Friday's first weigh in of the day, but if for some reason we practiced on Saturday it will need ot compare to Saturday's first weigh in of the day.
 

Users who are viewing this thread

Top Bottom