Hi
On rs.open it gives me above error
dim rs as adodb.recordset
dim str as string
Set rs = New ADODB.Recordset
str = "select transactionno,vehicleid,grossshiftdate,custname,prcname from transact where grossshiftdate=#" & CDate(Format(DTPicker1.Value, "mm/dd/yyyy")) & "# and transact.custid=customer.custid and transact.prcode=product.prcode and transact.trcode=transporter.trcode union select transactionno,vehicleid,prname, custname,grossshiftdate from transact,customer,product,users where tareshiftdate=#" & CDate(Format(DTPicker1.Value, "mm/dd/yyyy")) & "# and transact.custid=customer.custid and transact.prcode=product.prcode"
If rs.State = 1 Then rs.Close
rs.Open str, cnn1, adOpenDynamic, adLockOptimistic, adCmdText
Thanks
On rs.open it gives me above error
dim rs as adodb.recordset
dim str as string
Set rs = New ADODB.Recordset
str = "select transactionno,vehicleid,grossshiftdate,custname,prcname from transact where grossshiftdate=#" & CDate(Format(DTPicker1.Value, "mm/dd/yyyy")) & "# and transact.custid=customer.custid and transact.prcode=product.prcode and transact.trcode=transporter.trcode union select transactionno,vehicleid,prname, custname,grossshiftdate from transact,customer,product,users where tareshiftdate=#" & CDate(Format(DTPicker1.Value, "mm/dd/yyyy")) & "# and transact.custid=customer.custid and transact.prcode=product.prcode"
If rs.State = 1 Then rs.Close
rs.Open str, cnn1, adOpenDynamic, adLockOptimistic, adCmdText
Thanks