G
Gilles Maisonneuve via 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)
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)