C
chuck
Scenario:
I have a report that pulls up a pile of data: category, subtitle, and
Text. each subtitle and text are paired (unique) and fall within a
defined number of categories.
I had great success simply kicking off a report based on a query (date
criteria). then I got the notion to create a summary, simply a listing
of subtitles beneath categories. Me being lazy decided to use the same
form so I created a miniform that called the same report but gave me a
checkbox control that would cause the report to run, set the text
field height to zero and voila' a summary report w/o creating a new
query or report.
The code for the miniform checks the value of the checkbox
(full/summary) true/false, and based on that in an if-then-else, gives
me one [desired] result or the other - so far so good
Problem is the pesky miniform that I set up as a popup, persists after
the report is finished. SO - methinks - add a docmd.close after the
report is opened and the popup goes away.
Well - I was half right - when I run the full report, bypassing the
commands to manipulate the report field height, all is well and the
popup vanishes just like I desired (boy was I proud of myself).
Problem is, when the checkbox evaluates to cause the report field
height change, the query 'forgets' the criteria it was given from the
popup - I get a mini input asking for the value of
forms!miniform!text0. Argh. - after i give it the criteria by hand, I
get the proper looking (shortened) report, but the @#$%$ popup
miniform persists
I tried several things (I'll not list here) but the bottom line is
that the report properties manipulation always seems to choke the
report-feeding query.
In a fit of desperation I stuck a message box just after the report
field shrink code and the pause for the message box seemed to give
things enough time to complete and the shortened report compelted
properly and the miniform disappeared. I can't figure out what's
Happening. I'll try to illustrate the structure.
miniform gets input criteria and has the aforementioned checkbox.
click go-get-it button
[go-get-it button code in prose form follows]
open report (report datasource is a query that takes the criteria from
the miniform and selects records
test checkbox
ifcheckbox = false then
report.field.height = 0
<this is where I put the messagebox interruption for test>
else
endif
docmd.close miniform
[END go-get-it button code in prose form]
I don't have the actual code to scrape and paste It's at work, and the
'experts' are stymied
any suggestions?
I've found that Access has more goodies in it than a truckload of
Cracker-Jacks, and sometimes you have to dig for the prize and more
often than not - it's there.
This one evades me
Thanks -
I have a report that pulls up a pile of data: category, subtitle, and
Text. each subtitle and text are paired (unique) and fall within a
defined number of categories.
I had great success simply kicking off a report based on a query (date
criteria). then I got the notion to create a summary, simply a listing
of subtitles beneath categories. Me being lazy decided to use the same
form so I created a miniform that called the same report but gave me a
checkbox control that would cause the report to run, set the text
field height to zero and voila' a summary report w/o creating a new
query or report.
The code for the miniform checks the value of the checkbox
(full/summary) true/false, and based on that in an if-then-else, gives
me one [desired] result or the other - so far so good
Problem is the pesky miniform that I set up as a popup, persists after
the report is finished. SO - methinks - add a docmd.close after the
report is opened and the popup goes away.
Well - I was half right - when I run the full report, bypassing the
commands to manipulate the report field height, all is well and the
popup vanishes just like I desired (boy was I proud of myself).
Problem is, when the checkbox evaluates to cause the report field
height change, the query 'forgets' the criteria it was given from the
popup - I get a mini input asking for the value of
forms!miniform!text0. Argh. - after i give it the criteria by hand, I
get the proper looking (shortened) report, but the @#$%$ popup
miniform persists
I tried several things (I'll not list here) but the bottom line is
that the report properties manipulation always seems to choke the
report-feeding query.
In a fit of desperation I stuck a message box just after the report
field shrink code and the pause for the message box seemed to give
things enough time to complete and the shortened report compelted
properly and the miniform disappeared. I can't figure out what's
Happening. I'll try to illustrate the structure.
miniform gets input criteria and has the aforementioned checkbox.
click go-get-it button
[go-get-it button code in prose form follows]
open report (report datasource is a query that takes the criteria from
the miniform and selects records
test checkbox
ifcheckbox = false then
report.field.height = 0
<this is where I put the messagebox interruption for test>
else
endif
docmd.close miniform
[END go-get-it button code in prose form]
I don't have the actual code to scrape and paste It's at work, and the
'experts' are stymied
any suggestions?
I've found that Access has more goodies in it than a truckload of
Cracker-Jacks, and sometimes you have to dig for the prize and more
often than not - it's there.
This one evades me
Thanks -