
I continue to pester, I know
Try breaking at the line and in the debug window put
?rsClientDO.Fields(5).Name
You should get
ClientName
back, whatever you do get then try
?rsClientDO.Fields("what you got above").Value
and try
?rsClientDO![what you got above].Value
note the use of the square brackets is only mandatory if you have a space in
the name.
If your getting a result (i.e. no error) then the problem is that you either
selt the name wrong in code, or it's the left hand side of your expression
which is wrong.
and you can test that easily enough with
?prpsDO.Item("Name").Value
in the debug window.
Quote:
>If one has a recordset, and one wants to refer to a field, one can do the
>following:
>rs!FieldName
>Well, I can't. The recordset was based upon a query def, and is a snapshot
>type. Changing type did not help
>.
>Here's the line of code with the error:
>prpsDO.Item("Name").Value = Nz(rsClientDO!ClientName)
>"Error No. 3265, Item not found in this collection"
>NowI refer now to the field want with the number like this:
> prpsRecDis.Item("City").Value = Nz(rsClientDO.Fields(5))
>This works, but is quite annoying. I want to refer to the recordset based
>upon its name!!