Darren DICK
d.dick at uws.edu.au
Thu Feb 19 20:30:12 CST 2004
Hi Guys This is basically the same question I asked the other day that Stuart and some others answered This is basically the same code (that works elsewhere by the way) copied and pasted but with a slightly different SQL. I have tried to follow (as closely as possible) the syntax that Stuart recommended with the single quotes and stuff, but I just cant get it right I am continually getting either "Data Type Mismatch in expression" or, depending on what I do or do not type "No Value give for one or more parameters" AAAAARRRRGGGHHHHH!!!!! '+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dim selSQL As String Dim rs As Object Dim con As Object Set rs = CreateObject("ADODB.Recordset") Set con = Application.CurrentProject.Connection selSQL = "SELECT tblStudents, tblStudents.StudentID " _ & "FROM tblStudents & "WHERE (((tblStudents.StudentID)='" & [Forms]![frmStudents]![txtStudentID] & "'));" rs.Open selSQL, con, 1 ', 3 '<====================Debug fails here With rs MsgBox .RecordCount x = .RecordCount End With '++++++++++++++++++++++++++++++++++++++++++++++++++++++