Re: list of fields and their names in a form, under Access 2000 (* I am lost! *)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Troy (Troy_at_fmsinc.com)
Date: 02/18/05


Date: Fri, 18 Feb 2005 12:35:00 -0500

HA! Sorry, I was really unclear in my last post. I did not mean to say that
the *reference* must exist, but rather that DAO must exist on the
machine.....After re-reading it, that certainly isn't what I wrote down,
though....Silly scattered thoughts move so quickly...

-- 
Troy
Troy Munford
Development Operations Manager
FMS, Inc.
www.fmsinc.com
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:OtIG7OUFFHA.464@TK2MSFTNGP09.phx.gbl...
Actually, Access can run fine without the DAO reference, Troy. After all,
neither Access 2000 nor Access 2002 have that reference by default, and they
both run.
-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Troy" <Troy@fmsinc.com> wrote in message
news:eghdZhRFFHA.2828@TK2MSFTNGP09.phx.gbl...
> In order to use the DAO recordset Type, you need to set a reference to DAO
> (Microsoft Data Access Objects 3.6).
>
> Code Window/IDE -->Tools -->References -->Scroll down until you find
> "Microsoft Data Access Objects 3.6" -->Check the check box for this
> reference
>
> It *must* exist (yes, even in French <g>) for Access to even run at all!
>
> -- 
> Troy
>
> Troy Munford
> Development Operations Manager
> FMS, Inc.
> www.fmsinc.com
>
>
> "Gilles Maisonneuve via AccessMonster.com" <forum@AccessMonster.com> wrote
> in message news:4be67bc606974856ad698366db6d9b4c@AccessMonster.com...
> Hello,
>
> I a a newbie under Access. I've read the topics already dealing with field
> list in a form and how to handle but I have a problem: all the code
> samples
> given in this site and also with the help file provided with my (French)
> version of Access 2000 do not work.
>
> More precisely:
> 1?) DAO.Recordset does not exist so no code can be coded with this type of
> data
> 2?) using Recordset type to declare variable always bring me to "type
> incompatible" (I translate from French "Incompatibilit? de type") when I
> try the following code:
>
>  Dim rst As Recordset
>  Set rst = Me.RecordsetClone   <<< here is the erroneous statement seen
> under the debugger
>
> I can do it with the following syntax:
>
>  Dim rs As Object
>  Set rst = Me.RecordsetClone
>
> but then, when I use the code:
>
>   Dim fld As Field
>   For Each fld In rs
>       Debug.Print fld.Name
>   Next fld
>
> I get the error:
> "Unauthorised operation for this type of object" (error 3251). Once again
> I
> translate from French ("Op?ration non autoris?e pour ce type d'object") to
> English so forgive me if its the wrong message text.
>
>
> I'va been looking fo the whole day on internet and in the Access help
> files
> and I get a clue while all those samples are not functionning (I've also
> trie to use the syntax I found in the help and on the web: "For Each fld
> In
> Me.Recordset" and of course I get the same error message).
>
> *** Please can somebody help me, I am completely lost! ***
>
> Gilles (my address: gilles AT maisonneuve.dabsol.co.uk)
>
> -- 
> Message posted via http://www.accessmonster.com
>
>


Relevant Pages

  • Re: list of fields and their names in a form, under Access 2000 (* I am lost! *)
    ... Actually, Access can run fine without the DAO reference, Troy. ... > Dim fld As Field ...
    (microsoft.public.access.formscoding)
  • Re: Append "Description" property to field
    ... Append the fld object to the Fields collection before setting its ... you've got below uses DAO. ... Access 2003 does have a reference to DAO by default, ... Dim prpNew As DAO.Property ...
    (microsoft.public.access.devtoolkits)
  • Re: Export text file
    ... It is better to use just DAO and no ADO reference at all. ... recordset objects in the drop down list. ...
    (microsoft.public.access.externaldata)
  • Re: Converting from 97 to 2002 - DAO/ADO
    ... Once you do have the DAO 3.6 library referenced, and you do not have the ADO ... Microsoft DAO 2.5/3.5 Compatibility Layer ... >> you will need to remove that library, and re-write affected code before ... >> If your Access 97 database contains a reference to: ...
    (microsoft.public.access.modulesdaovba)
  • Re: This should be simple but it is not!
    ... you should explicitly declare your variables as ... > referencing the DAO object. ... I am playing with creating the recordset clone so I can ... Do I have to set any special reference that I ...
    (microsoft.public.access.forms)