Problem2: How to close the DSN connection window when using Data Report
I don't know why the DSN connection window will automatically show up when I using Data Report. Is there any way to close it or disable it, so that it will not pop up to trouble me again.
I attached the picture of this pop up window also.
szSql = "select contract, DueDate, Amount, Cname, Csur From contract, ar_sub, customer where contract.custid = customer.custid and contract.contractno = ar_sub.contractno and "
szSql = szSql & "ar_sub.subid like '" & SubID & "' and "
szSql = szSql & "month(duedate) like '" & m & "' and "
szSql = szSql & "year(duedate) like '" & Year(Date) & "' "
Invoice.Sections("section2").Controls("lblSub").Caption = Sname
DE.Commands("Invoice").CommandText = szSql
Invoice.Show
Set Invoice = Nothing
Set DE = Nothing