GUIDO22
Registered User.
- Local time
- Today, 22:07
- Joined
- Nov 2, 2003
- Messages
- 515
I have a REPORT containing 7 ('columnar') subreports.
Each subreport is to show showing a days worth of medical doses.... to visually represent a wall planner.
When the report loads - user enters a week value # via Inputbox().
This value is written to a TEMP table.
Each subreport accesses this same TEMP table to retrieve the week # value. In the Recordsource for each subreport I have the following code :
SELECT * FROM GETPATIENTREADINGS_WEEK WHERE (((Format([DateR],'ww'))=DLookup("WeekVal","[TEMPTABLE]")) AND ((GETPATIENTREADINGS_WEEK.DayVal)=1));
... where the DayVal goes from 1...7 corresponding to the columnar position of each subreport on the display ie. for each day of the week.
The problem I am having is that when the report runs - I see the display showing the data from when the report was previously run. ie. I have to run the report twice to see the data for the correct week value entered. All the SQL works as expected when I run from Query view but when I run through VBA....I get the problem...
Anyone any ideas to get me out of this rut would be appreciated.
(I am using 2003 by the way).
Thank you,
Each subreport is to show showing a days worth of medical doses.... to visually represent a wall planner.
When the report loads - user enters a week value # via Inputbox().
This value is written to a TEMP table.
Each subreport accesses this same TEMP table to retrieve the week # value. In the Recordsource for each subreport I have the following code :
SELECT * FROM GETPATIENTREADINGS_WEEK WHERE (((Format([DateR],'ww'))=DLookup("WeekVal","[TEMPTABLE]")) AND ((GETPATIENTREADINGS_WEEK.DayVal)=1));
... where the DayVal goes from 1...7 corresponding to the columnar position of each subreport on the display ie. for each day of the week.
The problem I am having is that when the report runs - I see the display showing the data from when the report was previously run. ie. I have to run the report twice to see the data for the correct week value entered. All the SQL works as expected when I run from Query view but when I run through VBA....I get the problem...
Anyone any ideas to get me out of this rut would be appreciated.
(I am using 2003 by the way).
Thank you,