Thanks for checking it out. Still kind of interesting to me.
"John Nurick" <j.mapSoN.nurick[ at ]dial.pipex.com> wrote in message news:v432u19334qsr8ijtihbvo7k3e5jek69qd[ at ]4ax.com...
[Quoted Text] >I can reproduce this. Using fuller syntax makes no difference: > Debug.Print rs.Fields.Item(J).Value > > But it's so trivial that I'm inclined to think of it as a lacuna in the > documentation rather than a bug. I can't think of any good reason to use > Byte as an iterator variable on a 32-bit system. > > BTW, it doesn't affect DAO.Recordset. > > On Wed, 1 Feb 2006 11:19:56 -0500, "GY2" <2muchspam[ at ]wherever.com> wrote: > >> >>The following code won't run for me in an Access module apparently because >>J >>is dimmed As Byte. The code runs fine with J As Integer or As Variant. >>Just >>curious but is this right? >> >>Sub RecordsetTest() >> >> Dim J As Byte >> >> Dim rs As adodb.recordset >> Dim cnn As adodb.Connection >> >> Set rs = New adodb.recordset >> Set cnn = CurrentProject.Connection >> >> rs.Open "tblWhatever", cnn >> >> Let J = 2 >> Debug.Print rs(2) >> Debug.Print rs(J) 'This will blowup with Dim J as Byte >> >>End Sub >> >> > > -- > John Nurick [Microsoft Access MVP] > > Please respond in the newgroup and not by email. >
|