can you please check m code?
tnx.
your help is greatly appreciated.
Expand|Select|Wrap|Line Numbers
- Private Sub cmdPrint_Click()
- Set rs = Adodc1.Recordset
- rs.Open "select * from tblborrower where AccessionNumber = " & CInt(txtAccessionNumber.Text) & " ", con, adOpenStatic, adLockOptimistic, adCmdText
- With DataReport3
- Set DataReport3.DataSource = rs
- .Sections("Section1").Controls("txtType").DataField = "status"
- .Sections("Section1").Controls("txtSection").DataField = "section"
- .Sections("Section1").Controls("txtborrower").DataField = "Borrower"
- .Sections("Section1").Controls("txtAccessionNumber").DataField = "AccessionNumber"
- .Sections("Section1").Controls("txtBooktitle").DataField = "BookTitle"
- .Sections("Section1").Controls("txtbooknumber").DataField = "BookNumber"
- .Sections("Section1").Controls("txtDB").DataField = "DateBorrowed"
- .Sections("Section1").Controls("txtCategory").DataField = "Category"
- .Sections("Section1").Controls("txtDR").DataField = "DateReturned"
- .Sections("Section1").Controls("txtremarks").DataField = "remarks"
- .Sections("Section1").Controls("txtcondition").DataField = "Condition"
- .Sections("Section1").Controls("txtdaysborrow").DataField = "department"
- .Sections("Section1").Controls("txtoverdue").DataField = "overduedays"
- .Sections("Section1").Controls("txtdays").DataField = "howmanydays"
- .Sections("Section1").Controls("txtfines").DataField = "fines"
- .Show
- End With
- End Sub