Thats wierd... Hours is a query in my access db not a table.... when I subsitute a table for the query name it works fine so I am not sure what the deal is. Here is the exact code that I am using.... It is vba behind an excel sheet, pointing to an mdb...
Function accessdata()
Dim db, rs
Set db = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=p:\trd apps\taas\newmaputl.mdb;Persist Security Info=False"
rs.Open "Select * from JAN-CONTHOURS1", db
rs.MoveFirst
Worksheets("z").Cells(1, 1).Value = rs("pin").Value
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Function