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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
After your table has been created you have to refresh the databasewindow

try something with: application.RefreshDatabaseWindow

in your code

hth
 
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
 
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...
 
Back
Top