sunilvedula
Sunil
- Local time
- Today, 21:05
- Joined
- Jan 18, 2007
- Messages
- 138
Can anyone please help me with the error in this code : there is something missing a double quote which is required or something. I am trying to compare three fields and pull the data and place it on a form. The error is: "Format of the initilization string does not confirm to the OLE DB Specification"
Private Sub CmdSearch_Click()
On Error GoTo Err_CmdSearch_Click
Dim rs As New ADODB.Recordset
Dim Cnxn As New ADODB.Connection
rs.Open "SELECT TblO4.Empid, TblO4.Month, TblO4.Year, TblO4.Core Standards, TblO4.Productivity, TblO4.Quality Standard, TblO4.Time Sheets, TblO4.Teamwork, TblO4. Audit Adherence, TblO4.ContinousImprovement, TblO4. Action Plan, TblO4.No of SL, TblO4.No of Time sick, Tblo4. No of Upl, TblO4.No of times unplanned, TblO4.No of PL, TblO4.No of Late Comming, TblO4.Balance Leave " _
Private Sub CmdSearch_Click()
On Error GoTo Err_CmdSearch_Click
Dim rs As New ADODB.Recordset
Dim Cnxn As New ADODB.Connection
rs.Open "SELECT TblO4.Empid, TblO4.Month, TblO4.Year, TblO4.Core Standards, TblO4.Productivity, TblO4.Quality Standard, TblO4.Time Sheets, TblO4.Teamwork, TblO4. Audit Adherence, TblO4.ContinousImprovement, TblO4. Action Plan, TblO4.No of SL, TblO4.No of Time sick, Tblo4. No of Upl, TblO4.No of times unplanned, TblO4.No of PL, TblO4.No of Late Comming, TblO4.Balance Leave " _
& " FROM TblO4", " WHERE TblO4.Empid = '" & CboxHbiid.Value & ", TblO4.Month = " & CboxMonth.Value & ", TblO4.Year = " & CboxYear.Value & ", Cnxn, adOpenDynamic"