Access 2003: Error says it can't find th table just created in SQL

G

Guest

Hi,

Access 2003 adp:
In my VBA code, I create a new table in SQL Server and then want to access
that same table later in the same sub procedure. After the table has been
successfully created, I then get an error in Access saying it can't find the
object --when it is definitelt there in SQL Server. If I close and re-open my
..adp, and run the same script, it finds the table.
Isn't there some kind method or function that can be called that would
refresh my .adp so that it sees the new table?

Thanks,
Eaton
 
G

Guest

After your table has been created you have to refresh the databasewindow

try something with: application.RefreshDatabaseWindow

in your code

hth
 
G

Guest

Hi Maurice,

Good idea and I tried this, but unfortnunately it didn't fix the problem;
I'm still getting the same error. There's got to be a way to handle this,
right? Any more ideas?

Thanks.
Eaton
 
G

Guest

I'll take a look on a different pc (i only have 2007 available for now) and
let you know what I come up with...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top