<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: open access table in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425642#M40896</link>
    <description>Yeah, that was imprecisely stated.  Single table updates don't require a&lt;BR /&gt;
primary key.  In joined table recordsets, I have had instances where I&lt;BR /&gt;
needed to add a primary key to one table and include that column in the SQL&lt;BR /&gt;
command text to get the recordset to write back to the table via the&lt;BR /&gt;
UpdateBatch method.  This is usually using the Jet OLEDB 4.0 with a static,&lt;BR /&gt;
client-side, batch optimistic mode cursor.  I still have to read the manual&lt;BR /&gt;
frequently &lt;G&gt;.&lt;BR /&gt;
-- &lt;BR /&gt;
John Goodfellow&lt;BR /&gt;
irtfnm&lt;BR /&gt;
use john at goodfellowassoc dot com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Lennart Nielsen" &lt;LNIELSEN&gt; wrote in message&lt;BR /&gt;
news:4952541@discussion.autodesk.com...&lt;BR /&gt;
Sorry to disagree, John, but you do not need a primary key field in the&lt;BR /&gt;
table to make it upgradeable.&lt;BR /&gt;
&lt;BR /&gt;
But you are correct, that sdanis just needs to check recordset.State to see&lt;BR /&gt;
if the recordset is open and you can do the same for the connection, if a&lt;BR /&gt;
separate connection has been made.&lt;BR /&gt;
&lt;BR /&gt;
Lennart&lt;BR /&gt;
&lt;BR /&gt;
"John Goodfellow" &lt;BITBUCKET&gt; wrote in message&lt;BR /&gt;
news:4951479@discussion.autodesk.com...&lt;BR /&gt;
Also notice some other properties that are useful for checking ADO objects.&lt;BR /&gt;
The recordset also has a State property.  The connection has an errors&lt;BR /&gt;
collection containing information specific to ADO errors.   Some errors will&lt;BR /&gt;
also show up in the VBA Err object.  The recordset has a Supports property,&lt;BR /&gt;
which can tell you if the current configuration supports updatesback to the&lt;BR /&gt;
base table.  The recordset CursorType, CursorLocation, and LockType&lt;BR /&gt;
properties all influence update behavior. Last, the recordset should include&lt;BR /&gt;
a primary key column to be updatable.&lt;BR /&gt;
 -- &lt;BR /&gt;
John Goodfellow&lt;BR /&gt;
irtfnm&lt;BR /&gt;
use john at goodfellowassoc dot com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949286@discussion.autodesk.com...&lt;BR /&gt;
I've had great luck with the info provided here, thanks to all.&lt;BR /&gt;
now my question&lt;BR /&gt;
How can I tell if a table in Access is already open using VBA?&lt;/SDANIS&gt;&lt;/BITBUCKET&gt;&lt;/LNIELSEN&gt;&lt;/G&gt;</description>
    <pubDate>Sat, 10 Sep 2005 13:49:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-09-10T13:49:15Z</dc:date>
    <item>
      <title>open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425630#M40884</link>
      <description>I've had great luck with the info provided here, thanks to all.&lt;BR /&gt;
now my question&lt;BR /&gt;
How can I tell if a table in Access is already open using VBA?</description>
      <pubDate>Wed, 07 Sep 2005 17:01:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425630#M40884</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T17:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425631#M40885</link>
      <description>Scott,&lt;BR /&gt;
&lt;BR /&gt;
Not sure if this points you in the right direction but all Access Objects have an IsLoaded property.&lt;BR /&gt;
&lt;BR /&gt;
You might have to be a little more specific as to whether you are using DoCmd.OpenTable, TableDef, ADO, DAO, etc...&lt;BR /&gt;
&lt;BR /&gt;
Good luck,&lt;BR /&gt;
&lt;BR /&gt;
Bob Coward&lt;BR /&gt;
CADS, Inc</description>
      <pubDate>Wed, 07 Sep 2005 17:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425631#M40885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T17:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425632#M40886</link>
      <description>Uhmm, the ADO model has a connection object&lt;BR /&gt;
and a recordset object, and each has properties and methods&lt;BR /&gt;
There is no table object in that model and&lt;BR /&gt;
I believe a table does not have an open property&lt;BR /&gt;
You read and write to a any table once you open the database&lt;BR /&gt;
&lt;BR /&gt;
Maybe you meant if it's already created ??&lt;BR /&gt;
Or if the database is already openned by someone else ??&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949286@discussion.autodesk.com...&lt;BR /&gt;
I've had great luck with the info provided here, thanks to all.&lt;BR /&gt;
now my question&lt;BR /&gt;
How can I tell if a table in Access is already open using VBA?&lt;/SDANIS&gt;</description>
      <pubDate>Wed, 07 Sep 2005 17:47:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425632#M40886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T17:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425633#M40887</link>
      <description>No..I meant outside of an Access Object and an IsLoaded property a more specirfic question might be required</description>
      <pubDate>Wed, 07 Sep 2005 17:50:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425633#M40887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T17:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425634#M40888</link>
      <description>Sorry Bob, I did not see your reply until now.&lt;BR /&gt;
I was answering to the OP not to your reply&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BCOWARD&gt; wrote in message news:4949349@discussion.autodesk.com...&lt;BR /&gt;
No..I meant outside of an Access Object and an IsLoaded property a more &lt;BR /&gt;
specirfic question might be required&lt;/BCOWARD&gt;</description>
      <pubDate>Wed, 07 Sep 2005 18:06:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425634#M40888</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T18:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425635#M40889</link>
      <description>Actually the table already exists.&lt;BR /&gt;
I just want to know if I can write to it as is (if it is open) or if it's not open so I nedd to open it.&lt;BR /&gt;
Btw, I'm using ADO</description>
      <pubDate>Wed, 07 Sep 2005 19:11:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425635#M40889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T19:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425636#M40890</link>
      <description>You might want to take a look at www.aspfaq.com (there are a few other great &lt;BR /&gt;
ones, but that's usually where I go first for such information).&lt;BR /&gt;
&lt;BR /&gt;
I know the question you asked has nothing to do with ASP, but that site has &lt;BR /&gt;
some excellent info on database calls via ADO.  The syntax is 95% identical, &lt;BR /&gt;
whether from ASP or VBA, etc, so it's mostly valid information.  Just watch &lt;BR /&gt;
out for data types, as ASP is all variants.&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949479@discussion.autodesk.com...&lt;BR /&gt;
Actually the table already exists.&lt;BR /&gt;
I just want to know if I can write to it as is (if it is open) or if it's &lt;BR /&gt;
not open so I nedd to open it.&lt;BR /&gt;
Btw, I'm using ADO&lt;/SDANIS&gt;</description>
      <pubDate>Wed, 07 Sep 2005 19:54:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425636#M40890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T19:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425637#M40891</link>
      <description>Most likely, as you said that you just want to read/write data to the &lt;BR /&gt;
database, you would use ADO ( or DAO) to access the database from you r VBA &lt;BR /&gt;
code. Oddly enough, it has nothing to do with MS Access (the application), &lt;BR /&gt;
you do not even neet is being installed.&lt;BR /&gt;
&lt;BR /&gt;
Assume you use ADO. You connect to the database with ADO.Connection object, &lt;BR /&gt;
which has Connection.Open() and Connection.Close() method. You can also &lt;BR /&gt;
examine Connection.State property to see if it is open or not.&lt;BR /&gt;
&lt;BR /&gt;
The code to connect to a database (*.mdb) will look like:&lt;BR /&gt;
&lt;BR /&gt;
Dim cn AS ADODB.Connection&lt;BR /&gt;
Set cn=New ADODB.Connection&lt;BR /&gt;
&lt;BR /&gt;
Dim strConnectionString As String&lt;BR /&gt;
strConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data &lt;BR /&gt;
Source=C:\Documents and Settings\nyuan\Desktop\db1.mdb;Persist Security &lt;BR /&gt;
Info=False"&lt;BR /&gt;
&lt;BR /&gt;
cn.Open strConnectionString&lt;BR /&gt;
&lt;BR /&gt;
Then you can run SELECT/UPDATE/INSERT sql statement with this open &lt;BR /&gt;
connection.&lt;BR /&gt;
&lt;BR /&gt;
If you use DAO, the code is not the same, but similar.&lt;BR /&gt;
&lt;BR /&gt;
So, you usally do not have to worry if the "table is open or not". You &lt;BR /&gt;
simply open connection to the database as you need it, and close it when you &lt;BR /&gt;
done. A database is meant to be shared by many users. Ideally, your VBA code &lt;BR /&gt;
should handle connection open/close on its own.&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949479@discussion.autodesk.com...&lt;BR /&gt;
Actually the table already exists.&lt;BR /&gt;
I just want to know if I can write to it as is (if it is open) or if it's &lt;BR /&gt;
not open so I nedd to open it.&lt;BR /&gt;
Btw, I'm using ADO&lt;/SDANIS&gt;</description>
      <pubDate>Wed, 07 Sep 2005 20:06:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425637#M40891</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T20:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425638#M40892</link>
      <description>... also lookup the CursorType and LockType properties for &lt;BR /&gt;
ADODB.Recordset&lt;BR /&gt;
&lt;BR /&gt;
- Jose&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Norman Yuan &lt;NOTREAL&gt; wrote in&lt;BR /&gt;
news:4949551@discussion.autodesk.com: &lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Most likely, as you said that you just want to read/write data to the &lt;BR /&gt;
&amp;gt; database, you would use ADO ( or DAO) to access the database from you&lt;BR /&gt;
&amp;gt; r VBA code. Oddly enough, it has nothing to do with MS Access (the&lt;BR /&gt;
&amp;gt; application), you do not even neet is being installed.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Assume you use ADO. You connect to the database with ADO.Connection&lt;BR /&gt;
&amp;gt; object, which has Connection.Open() and Connection.Close() method. You&lt;BR /&gt;
&amp;gt; can also examine Connection.State property to see if it is open or&lt;BR /&gt;
&amp;gt; not. &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; The code to connect to a database (*.mdb) will look like:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Dim cn AS ADODB.Connection&lt;BR /&gt;
&amp;gt; Set cn=New ADODB.Connection&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Dim strConnectionString As String&lt;BR /&gt;
&amp;gt; strConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data &lt;BR /&gt;
&amp;gt; Source=C:\Documents and Settings\nyuan\Desktop\db1.mdb;Persist&lt;BR /&gt;
&amp;gt; Security Info=False"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; cn.Open strConnectionString&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Then you can run SELECT/UPDATE/INSERT sql statement with this open &lt;BR /&gt;
&amp;gt; connection.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; If you use DAO, the code is not the same, but similar.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; So, you usally do not have to worry if the "table is open or not". You&lt;BR /&gt;
&amp;gt; simply open connection to the database as you need it, and close it&lt;BR /&gt;
&amp;gt; when you done. A database is meant to be shared by many users.&lt;BR /&gt;
&amp;gt; Ideally, your VBA code should handle connection open/close on its own.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;SDANIS&gt; wrote in message news:4949479@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Actually the table already exists.&lt;BR /&gt;
&amp;gt; I just want to know if I can write to it as is (if it is open) or if&lt;BR /&gt;
&amp;gt; it's not open so I nedd to open it.&lt;BR /&gt;
&amp;gt; Btw, I'm using ADO&lt;/SDANIS&gt;&lt;/NOTREAL&gt;</description>
      <pubDate>Wed, 07 Sep 2005 20:59:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425638#M40892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T20:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425639#M40893</link>
      <description>Actually what you need to know is if the database is open&lt;BR /&gt;
For this you'll need the connection object&lt;BR /&gt;
&lt;BR /&gt;
if cn.State = adstateopen then&lt;BR /&gt;
    'database is open, you can read/write&lt;BR /&gt;
else&lt;BR /&gt;
    'it's closed, you need to open it&lt;BR /&gt;
    cn.open "Your open string here"&lt;BR /&gt;
end if&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949479@discussion.autodesk.com...&lt;BR /&gt;
Actually the table already exists.&lt;BR /&gt;
I just want to know if I can write to it as is (if it is open) or if it's &lt;BR /&gt;
not open so I nedd to open it.&lt;BR /&gt;
Btw, I'm using ADO&lt;/SDANIS&gt;</description>
      <pubDate>Wed, 07 Sep 2005 23:05:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425639#M40893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-07T23:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425640#M40894</link>
      <description>Also notice some other properties that are useful for checking ADO objects.&lt;BR /&gt;
The recordset also has a State property.  The connection has an errors&lt;BR /&gt;
collection containing information specific to ADO errors.   Some errors will&lt;BR /&gt;
also show up in the VBA Err object.  The recordset has a Supports property,&lt;BR /&gt;
which can tell you if the current configuration supports updatesback to the&lt;BR /&gt;
base table.  The recordset CursorType, CursorLocation, and LockType&lt;BR /&gt;
properties all influence update behavior. Last, the recordset should include&lt;BR /&gt;
a primary key column to be updatable.&lt;BR /&gt;
 -- &lt;BR /&gt;
John Goodfellow&lt;BR /&gt;
irtfnm&lt;BR /&gt;
use john at goodfellowassoc dot com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949286@discussion.autodesk.com...&lt;BR /&gt;
I've had great luck with the info provided here, thanks to all.&lt;BR /&gt;
now my question&lt;BR /&gt;
How can I tell if a table in Access is already open using VBA?&lt;/SDANIS&gt;</description>
      <pubDate>Fri, 09 Sep 2005 11:46:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425640#M40894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-09T11:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425641#M40895</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Sorry to disagree, John, but you do not need a &lt;BR /&gt;
primary key field in the table to make it upgradeable.&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;But you are correct, that sdanis just needs to &lt;BR /&gt;
check &lt;EM&gt;recordset&lt;/EM&gt;.State to see if the recordset is open and you can do &lt;BR /&gt;
the same for the connection, if a separate connection has been &lt;BR /&gt;
made.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Lennart&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;"John Goodfellow" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="mailto:bitbucket@verizon.net"&amp;gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;bitbucket@verizon.net&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial" size="2"&gt;&amp;gt; wrote in &lt;BR /&gt;
message &lt;/FONT&gt;&lt;A href="news:4951479@discussion.autodesk.com"&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;news:4951479@discussion.autodesk.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="Arial" size="2"&gt;Also notice some other properties &lt;BR /&gt;
that are useful for checking ADO objects.&lt;BR /&gt;The recordset also has a State &lt;BR /&gt;
property.&amp;nbsp; The connection has an errors&lt;BR /&gt;collection containing &lt;BR /&gt;
information specific to ADO errors.&amp;nbsp;&amp;nbsp; Some errors will&lt;BR /&gt;also show up &lt;BR /&gt;
in the VBA Err object.&amp;nbsp; The recordset has a Supports property,&lt;BR /&gt;which can &lt;BR /&gt;
tell you if the current configuration supports updatesback to the&lt;BR /&gt;base &lt;BR /&gt;
table.&amp;nbsp; The recordset CursorType, CursorLocation, and &lt;BR /&gt;
LockType&lt;BR /&gt;properties all influence update behavior. Last, the recordset should &lt;BR /&gt;
include&lt;BR /&gt;a primary key column to be updatable.&lt;BR /&gt;&amp;nbsp;-- &lt;BR /&gt;John &lt;BR /&gt;
Goodfellow&lt;BR /&gt;irtfnm&lt;BR /&gt;use john at goodfellowassoc dot &lt;BR /&gt;
com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;sdanis&amp;gt; wrote in message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="news:4949286@discussion.autodesk.com"&amp;gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;news:4949286@discussion.autodesk.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;...&lt;BR /&gt;I've had great luck with the info provided here, thanks to &lt;BR /&gt;
all.&lt;BR /&gt;now my question&lt;BR /&gt;How can I tell if a table in Access is already open &lt;BR /&gt;
using VBA?&lt;/FONT&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 10 Sep 2005 02:37:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425641#M40895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-10T02:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425642#M40896</link>
      <description>Yeah, that was imprecisely stated.  Single table updates don't require a&lt;BR /&gt;
primary key.  In joined table recordsets, I have had instances where I&lt;BR /&gt;
needed to add a primary key to one table and include that column in the SQL&lt;BR /&gt;
command text to get the recordset to write back to the table via the&lt;BR /&gt;
UpdateBatch method.  This is usually using the Jet OLEDB 4.0 with a static,&lt;BR /&gt;
client-side, batch optimistic mode cursor.  I still have to read the manual&lt;BR /&gt;
frequently &lt;G&gt;.&lt;BR /&gt;
-- &lt;BR /&gt;
John Goodfellow&lt;BR /&gt;
irtfnm&lt;BR /&gt;
use john at goodfellowassoc dot com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Lennart Nielsen" &lt;LNIELSEN&gt; wrote in message&lt;BR /&gt;
news:4952541@discussion.autodesk.com...&lt;BR /&gt;
Sorry to disagree, John, but you do not need a primary key field in the&lt;BR /&gt;
table to make it upgradeable.&lt;BR /&gt;
&lt;BR /&gt;
But you are correct, that sdanis just needs to check recordset.State to see&lt;BR /&gt;
if the recordset is open and you can do the same for the connection, if a&lt;BR /&gt;
separate connection has been made.&lt;BR /&gt;
&lt;BR /&gt;
Lennart&lt;BR /&gt;
&lt;BR /&gt;
"John Goodfellow" &lt;BITBUCKET&gt; wrote in message&lt;BR /&gt;
news:4951479@discussion.autodesk.com...&lt;BR /&gt;
Also notice some other properties that are useful for checking ADO objects.&lt;BR /&gt;
The recordset also has a State property.  The connection has an errors&lt;BR /&gt;
collection containing information specific to ADO errors.   Some errors will&lt;BR /&gt;
also show up in the VBA Err object.  The recordset has a Supports property,&lt;BR /&gt;
which can tell you if the current configuration supports updatesback to the&lt;BR /&gt;
base table.  The recordset CursorType, CursorLocation, and LockType&lt;BR /&gt;
properties all influence update behavior. Last, the recordset should include&lt;BR /&gt;
a primary key column to be updatable.&lt;BR /&gt;
 -- &lt;BR /&gt;
John Goodfellow&lt;BR /&gt;
irtfnm&lt;BR /&gt;
use john at goodfellowassoc dot com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;SDANIS&gt; wrote in message news:4949286@discussion.autodesk.com...&lt;BR /&gt;
I've had great luck with the info provided here, thanks to all.&lt;BR /&gt;
now my question&lt;BR /&gt;
How can I tell if a table in Access is already open using VBA?&lt;/SDANIS&gt;&lt;/BITBUCKET&gt;&lt;/LNIELSEN&gt;&lt;/G&gt;</description>
      <pubDate>Sat, 10 Sep 2005 13:49:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425642#M40896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-10T13:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425643#M40897</link>
      <description>Great stuff!!&lt;BR /&gt;
Thanks all.</description>
      <pubDate>Mon, 12 Sep 2005 11:59:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425643#M40897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-12T11:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: open access table</title>
      <link>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425644#M40898</link>
      <description>DoCmd.OpenTable&lt;BR /&gt;
 TableDef, &lt;BR /&gt;
how descirbe " docmd.opentable " after&lt;BR /&gt;
 docmd.opentable.-&amp;gt;</description>
      <pubDate>Thu, 14 Dec 2006 08:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/open-access-table/m-p/1425644#M40898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-12-14T08:51:49Z</dc:date>
    </item>
  </channel>
</rss>

