Adodc1.RecordSource = "Select * from brecord where month_borrowed = " & _
"'" & frmonth.txtmonth.Text & "'"
Adodc1.Refresh


Rptlibrarysystem.Show

is my code alright do i have to set code in data environment or data report im using ms access the problem i'm having is printing a certain date record and list the books in that said date. it just show all records in the data base.thnks in advnce. im doing a library system. just wanted to learn how display and print it for the recrd.

Hi,

U must have bult Command Object and Designed the Report.

Just Change the Condition in the Report.
So when u Show the Report,
Just give this:
Set Datareport1.DataSource =Adodc.Recordsource
DataReport1.Refresh
Datareport1.Show


here u need to take care that, whatever tables with joins u have used while designing, same tables should be given in adodc's rec source..
or else u may end up with error

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.