Hi
I'm using the following code to retrieve some data from a seperate DB:
Dim con As New ADODB.Connectio n
con.Open _
"Provider=Micro soft.jet.oledb. 4.0; Data Source=\
\feltfps0002\ge ngrpshare0009\S MP\CONFIDENTIAL \Programme office\PIP
\PIP.mdb"
sql07 = "select * from qryBBLatestDate s Where LatestViewDate
between #04/01/2007# and #03/31/2008# and Type_of_site = " &
"""Extensio n""" & ""
rstYear07.Open sql07, con, adOpenForwardOn ly, adLockReadOnly
If rstYear07.Recor dCount 0 Then
rstYear07.MoveF irst
Do While Not rstYear07.EOF
..........
However, it wont seem to retrieve the data, as the recordcount is
always -1. Ive pasted the code into a query and it does pull out of a
number of records so i cant figure out where im going wrong. Any
ideas?
Thanks for any suggestions
Paul