Joe Hecht
jmhecht at earthlink.net
Sun Jun 17 10:15:32 CDT 2007
Arthur, It is the wizard code. I am going to check the references and see if I need to load something. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, June 17, 2007 3:49 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Hi I am back and stuck The syntax looks solid. I write it slightly differently but that's not the issue. My guess is that you're using a version that defaults to ADO rather than DAO. I forget when that began, but ensure that you have a reference to DAO that is above the ADO reference in the list and try your code again. Arthur On 6/16/07, Joe Hecht <jmhecht at earthlink.net> wrote: > > Hi Gang, > > > > I am back and feeling silly. Can not make combo box work. > > > > I want to go to the record the combo selects > > > > > > > > Private Sub Combo27_AfterUpdate() > > ' Find the record that matches the control. > > Dim rs As Object > > > > Set rs = Me.Recordset.Clone > > rs.FindFirst "[EmpRecNum] = " & Str(Nz(Me![Combo27], 0)) > > If Not rs.EOF Then Me.Bookmark = rs.Bookmark > > End Sub > > > > The sql > > > > SELECT tblEmployee.EmpRecNum, tblEmployee.EmpNumber, tblEmployee.EmpFname, > tblEmployee.EmpLName, [emplname] & ", " & [empfname] & " " & [empNumber] > AS > Expr1 > > FROM tblEmployee > > ORDER BY tblEmployee.EmpLName; > > > > I have it so that it is showing expression one but I get > > > > Run time error 13 on the following code line: > > > > rs.FindFirst "[EmpRecNum] = " & Str(Nz(Me![Combo27], 0)) > > > > > > Please advise > > > > Thanks > > > > Joe > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com