Store a result from a query

  • Thread starter Thread starter Linda RQ
  • Start date Start date
L

Linda RQ

Hi Everyone,

I need help from start to finish because I think there are probably many
steps to do this. I would like to put a command button on a form so when
the user clicks on it, the result from my query will be stored in a table or
excel spreadsheet.

The name of the query that give me my result is
"qryActiveOnB2AppThpyPercent"

The expression in the query that yields the result is
AppropriateThpyPercent:
[QRYActiveOnB2AndAppropriateThpyCount.CountOfPtID]/[QRYActiveOnB2AgonistThpyCount.CountOfPtID]

The ultimate goal is to get the monthly numbers

Thanks,
Linda
 
No need to store anything. You can add criteria to your query that would
limit the results based on a date range. Thus, you could get the January
number in June if you wanted. This would avoid a whole lot of coding on your
behalf and data duplication.... Let the db do the work for you.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com
If this post was helpful, please rate it by using the vote buttons.
 
Hi Daniel,

Thanks for answering. If it's not stored anywhere, how can I get the info
later? This number changes everytime any records change which is very often
24 hours a day. We only report the number at a certain time of day but need
to keep track constantly and act appropriately based on the number. These
two fields are checkboxes and they are in the Patients table (I know....bad
design but it is where I am at and it's working well). If the patient is on
B2agonist therapy the box is checked. If the patient is on Appropriate
therapy that box is checked. The query compares the 2 numbers and generates
the percent of patients that are on appropriate therapy. These boxes can
change several times during the course of a patient's stay. If this will
take a lot of coding I probably won't be able to do it. Worst Case Sceanareo
is they can just write the number on thier shift report sheet and the
secretary can enter it into my current spreadsheet.

Linda


Daniel Pineault said:
No need to store anything. You can add criteria to your query that would
limit the results based on a date range. Thus, you could get the January
number in June if you wanted. This would avoid a whole lot of coding on
your
behalf and data duplication.... Let the db do the work for you.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com
If this post was helpful, please rate it by using the vote buttons.



Linda RQ said:
Hi Everyone,

I need help from start to finish because I think there are probably many
steps to do this. I would like to put a command button on a form so when
the user clicks on it, the result from my query will be stored in a table
or
excel spreadsheet.

The name of the query that give me my result is
"qryActiveOnB2AppThpyPercent"

The expression in the query that yields the result is
AppropriateThpyPercent:
[QRYActiveOnB2AndAppropriateThpyCount.CountOfPtID]/[QRYActiveOnB2AgonistThpyCount.CountOfPtID]

The ultimate goal is to get the monthly numbers

Thanks,
Linda
 
Back
Top