Here are the relevant "givens" to my problem...
Form: frmLaunchRpt
- Text Box: txtAsOfDate
- Check Box: chkLogEval
- Command Button: cmdLaunchRpt
Report: rptEvaluation
- Text Box: txtGreen (Percent of items on schedule)
- Text Box: txtYellow (Percent of items slightly off schedule)
- Text Box: txtRed (Percent of items greatly off schedule)
Here is a sample of what information I want to output and store on a
table...
Table: tblLogEvaluatio n
[Date] [Green] [Yellow] [Red]
txtAsOfDate(1) txtGreen(1) txtYellow(1) txtRed(1)
txtAsOfDate(2) txtGreen(2) txtYellow(2) txtRed(2)
txtAsOfDate(3) txtGreen(3) txtYellow(3) txtRed(3)
..
..
..
txtAsOfDate(n) txtGreen(n) txtYellow(n) txtRed(n)
The problem...
I have a percentage calculation in the report footer of my
"rptEvaluat ion" report. The information in the footer of the report
needs to be logged to a table, but not every time the report is run.
To accomplish this, the user will have a check-box selection called
"chkLogEval " on a form (frmLaunchRpt) that launches rptEvaluation. So
the information in rptEvaluation will ONLY be logged to a table when
the condition chkLogEval = TRUE. The user presses the launch button
(cmdLaunchRpt) to open the report.
The Solution...
I want to write a VBA script under the "On Open" property of
rptEvaluation to check to see if chkLogEval = TRUE. If it is, then it
will append an entry to tblLogEvaluatio n, retrieving the fields shown
in the sample table.
Please assist me with the proper coding to solve this problem.
Thanks in advance.