[AccessD] Hi I am back and stuck

Arthur Fuller fuller.artful at gmail.com
Sun Jun 17 20:18:25 CDT 2007


I don't know. I defer to the really smart people here.

A.


On 6/17/07, Darren D <darrend at nimble.com.au> wrote:
>
> Howdy
>
> Thanks for this
>
> No fault here Arthur - I actually look forward to your posts
>
> I am in fact most ignorant of recordset objects
>
>
> In the list of references - DAO is not mentioned as I removed it - But the
> FindFirst still works!
>
> This is the bit I did not understand??
>
>
> If it is a DAO capability - why does it still work after I remove DAO from
> the
> ref lists
>
> I even Compacted and repaired the dB - and re-opened it after removal of
> DAO
>
> Still the combo After_Update event fired - no errors - and it even found
> the
> relevant record
>
> Using
> ~~~~~~~~~~~~~~~~~~~~
> Me.RecordsetClone.FindFirst "SomePKinThedB =" & Me![cmbSomeCoolCombo]
> Me.Bookmark = Me.RecordsetClone.Bookmark
> ~~~~~~~~~~~~~~~~~~~~
>
> Darren
> ------------------
> T: 0424 696 433
>
> -----Original Message-----
> From: Arthur Fuller [mailto:fuller.artful at gmail.com]
> Sent: Monday, 18 June 2007 10:45 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Hi I am back and stuck
>
> Forgive me. I thought I made it clear, but obviously I failed. My fault.
>
> 1. If you are going to mix ADO and DAO, then you should declare each
> object
> explicitly, so Access knows which one you mean. (I gave an example
> creating
> two recordsets, one of each type.) Should you try rs2.FindFIrst(...) you
> will get busted. Should you try rs1.Find(...) you will get busted.
>
> 2. You can mix and match, and I do now and then, but most often I make a
> global (app-centric) decision as to which side of the street I'm going to
> walk. Thereafter, I stick to it, and no problems. I don't care which side
> you choose, but I recommend that you choose one and stick to it
> throughout.
> Then you don't have to bother with with "ADODB" prefix or its altenative.
>
> The list as you presented it does not include DAO, and therefore cannot
> execute FindFirst. You Must include the other library as previously
> described, DAO 3.6 or whatever the latest version is.
>
> I hope this didn't come across as pedantic. (I'm conscious of this since
> receiving a few emails lately.) All I mean to say is that if you want to
> use
> "FindFirst" then you MUST include a reference to DAO. Otherwise Access
> will
> look at the ADO library, fail to find "FindFirst", and bust you.
>
> hth,
> Arthur
>
>
> On 6/17/07, Darren D <darrend at nimble.com.au> wrote:
> >
> > Hi Arthur
> >
> > Thanks for this
> >
> > Just to try
> >
> > 1       I made sure the DAO was above the ActiveX Data Objects ref in
> the
> > list
> >        All worked well - as expected
> >
> > 2       Made the ActiveX Data Objects Ref higher than the DAO
> >        compacted and repaired and re-opened - it still worked
> >
> > 3       So to take it to the fullest level I removed the DAO ref
> > altogether
> >        Compacted repaired and re-opened
> >        (Couldn't compile because of explicit DAO references)
> >        but the (search feature) combo still worked
> >
> > What gives?
> >
> > Full Ref list =
> > 1       Visual Basic for Applications
> > 2       Microsoft Access 11 Object Library
> > 3       OLE Automation
> > 4       Microsoft ActiveX data Objects 2.1 Library
> >
> > Darren
> > ------------------
> > T: 0424 696 433
> >
> > -----Original Message-----
> > From: Arthur Fuller [mailto:fuller.artful at gmail.com]
> > Sent: Monday, 18 June 2007 9:48 AM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] Hi I am back and stuck
> >
> > As I mentioned previously, this code will get busted if the default data
> > access method is ADO. There is no FindFirst in ADO; only Find.
> >
> > A.
> >
> >
> > On 6/17/07, Darren D <darrend at nimble.com.au> wrote:
> > >
> > > Hi Joe
> > >
> > > In my code I use just the following - without referencing recordsets
> > >
> > > Private Sub SomeCombo_AfterUpdate()
> > >
> > >       Me.RecordsetClone.FindFirst "SomePKinThedB =" &
> > > Me![cmbSomeCoolCombo]
> > >       Me.Bookmark = Me.RecordsetClone.Bookmark
> > >
> > > End sub
> > >
> > > Pretty much the same as what you have - slightly different though
> > >
> > > That's it
> > >
> > > Darren
> > > ------------------
> > > T: 0424 696 433
> > > -----Original Message-----
> > > From: Joe Hecht [mailto:jmhecht at earthlink.net]
> > > Sent: Monday, 18 June 2007 1:16 AM
> > > To: 'Access Developers discussion and problem solving'
> > > Subject: Re: [AccessD] Hi I am back and stuck
> > >
> > > 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
> > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date:
> > 14/06/2007
> > > 12:44
> > > PM
> > >
> > >
> > > No virus found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date:
> > 14/06/2007
> > > 12:44
> > > PM
> > >
> > >
> > > --
> > > 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
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date:
> 14/06/2007
> > 12:44
> > PM
> >
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date:
> 14/06/2007
> > 12:44
> > PM
> >
> >
> > --
> > 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
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date: 14/06/2007
> 12:44
> PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date: 14/06/2007
> 12:44
> PM
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list