Hi
I'm using the following code to retrieve some data from a seperate DB:
Dim con As New ADODB.Connection
con.Open _
"Provider=Microsoft.jet.oledb.4.0; Data Source=\
\feltfps0002\gengrpshare0009\SMP\CONFIDENTIAL\Prog ramme office\PIP
\PIP.mdb"
sql07 = "select * from qryBBLatestDates Where LatestViewDate
between #04/01/2007# and #03/31/2008# and Type_of_site = " &
"""Extension""" & ""
rstYear07.Open sql07, con, adOpenForwardOnly, adLockReadOnly
If rstYear07.RecordCount 0 Then
rstYear07.MoveFirst
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