A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old July 31st, 2007, 09:22 AM posted to microsoft.public.access.tablesdbdesign
Eaton
external usenet poster
 
Posts: 11
Default Access 2003: Error says it can't find th table just created in SQL

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
  #2  
Old July 31st, 2007, 05:06 PM posted to microsoft.public.access.tablesdbdesign
Maurice
external usenet poster
 
Posts: 1,585
Default Access 2003: Error says it can't find th table just created in SQL

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

try something with: application.RefreshDatabaseWindow

in your code

hth
--
Maurice Ausum


"Eaton" wrote:

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

  #3  
Old July 31st, 2007, 06:40 PM posted to microsoft.public.access.tablesdbdesign
Eaton
external usenet poster
 
Posts: 11
Default Access 2003: Error says it can't find th table just created in

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

"Maurice" wrote:

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

try something with: application.RefreshDatabaseWindow

in your code

hth
--
Maurice Ausum


"Eaton" wrote:

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

  #4  
Old July 31st, 2007, 07:08 PM posted to microsoft.public.access.tablesdbdesign
Maurice
external usenet poster
 
Posts: 1,585
Default Access 2003: Error says it can't find th table just created in

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...
--
Maurice Ausum


"Eaton" wrote:

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

"Maurice" wrote:

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

try something with: application.RefreshDatabaseWindow

in your code

hth
--
Maurice Ausum


"Eaton" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.