hai, i have a table called attendance which contains Student ID, Date and Attendance as its fields. I want to display the record with particular date on the data report. How can i do this, please help me in this regard. Thank You.
Printable View
hai, i have a table called attendance which contains Student ID, Date and Attendance as its fields. I want to display the record with particular date on the data report. How can i do this, please help me in this regard. Thank You.
The data report gets its record source from a data environment.
Set the data environment record source to something like this:
SELECT * FROM Attendance WHERE Attendance.Date = '01/01/2006'
If the particular date will change, and you may want to query the record source for different dates at different times, then you can try the following.
On a Form, add a TextBox named 'txtMyDate' and a CommandButton.
Change the above SQL statement to this:
SELECT * FROM Attendance WHERE Attendance.Date = txtMyDate
When the CommandButton is clicked at runtime, show the report.
Remember that since the report is getting this date from the Form, make sure the Form does not close, if you need to, then just hide the form.
Hope this helps,
Darrell