VB Code:
Private Sub cmdPrnt_Click()
If Combo1.Text = "" Then
MsgBox "Please select an account to print", vbExclamation, "Warning"
Else
Set rsDis1 = New ADODB.Recordset
Set rsDis1 = cn.Execute("select * from checktable where chkname = '" & Combo1.Text & "' ")
Set rptCheck.DataSource = rsDis1
rptCheck.Sections("Section4").Controls("lblAccount").Caption = UCase("***" & rsDis1.Fields("chkname").Value & "***")
rptCheck.Sections("Section2").Controls("lblDate").Caption = UCase(rsDis1.Fields("chkdate").Value)
rptCheck.Sections("Section4").Controls("lblTotal").Caption = rsDis1.Fields("chkTotal").Value
rptCheck.Sections("Section4").Controls("lblNum2Wrd").Caption = UCase(rsDis1.Fields("chknumtoword").Value)
rptCheck.Refresh
'DataReport1.Show
rptCheck.PrintReport
rsDis1.Close
Unload Me
frmSplash.Show
End If
End Sub