T
TimWhitehill
Hi,
I have a bizzare problem. I had code that worked last week and now all of
the sudden it doesn't. No patches or other changes have been applied to my
computer. The network staff in my office has verified this. I'm running
Access 2007. I found no changes in my references and I've doubled checked to
make sure I have the correct ones selected.
The following is a simplified version of the code that I've been using to
try to debug this monster.
Function checkdate() As Date
Dim db As DAO.Database
Dim mt As DAO.Recordset2
Set db = CurrentDb
Set mt = db.OpenRecordset("dbo.DateTable", dbOpenTable)
checkdate = mt("firstdate")
mt.Close
End Function
The error I get back is:
Run-Time error '3078'
The microsoft office access database engine cannot find the input table or
query 'dbo.DateTable'. Make sure it exists and that its name is spelled
correctly
The dbo.DateTable is on an SQL server and I'm linking to it. I can open the
table from Access and I can run queries against it. Here's a weird thing, if
I make a query that reads the table, I can access it in my code. This means I
can get around my problem, but I don't understand why this worked fine for a
month and then come in Monday morning and I get the error. I also tested that
all SQL linked tables I have give me this error, Access tables work fine. I
even created a brand new database to test this and I still get the error.
I have a bizzare problem. I had code that worked last week and now all of
the sudden it doesn't. No patches or other changes have been applied to my
computer. The network staff in my office has verified this. I'm running
Access 2007. I found no changes in my references and I've doubled checked to
make sure I have the correct ones selected.
The following is a simplified version of the code that I've been using to
try to debug this monster.
Function checkdate() As Date
Dim db As DAO.Database
Dim mt As DAO.Recordset2
Set db = CurrentDb
Set mt = db.OpenRecordset("dbo.DateTable", dbOpenTable)
checkdate = mt("firstdate")
mt.Close
End Function
The error I get back is:
Run-Time error '3078'
The microsoft office access database engine cannot find the input table or
query 'dbo.DateTable'. Make sure it exists and that its name is spelled
correctly
The dbo.DateTable is on an SQL server and I'm linking to it. I can open the
table from Access and I can run queries against it. Here's a weird thing, if
I make a query that reads the table, I can access it in my code. This means I
can get around my problem, but I don't understand why this worked fine for a
month and then come in Monday morning and I get the error. I also tested that
all SQL linked tables I have give me this error, Access tables work fine. I
even created a brand new database to test this and I still get the error.