+ Reply to Thread
Results 1 to 1 of 1

Error when trying to create a table programmatically in MS Access

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    7

    Unhappy Error when trying to create a table programmatically in MS Access

    Hi,
    I have an excel sheet, where I run a backup process, it is supposed to create a table in MSAccess database and insert all the data from the sheet.
    This was working just fine and all of the sudden, when I run it the first time I get an error when I execute the Create statement
    Object invalid or no longer set.
    then if I run it again I get Could not find field 'SID'.

    The create statement is the following
    create _ow_table (IpersonsInameIColumn varchar,IowingIColumn varchar,IownerIColumn varchar,IamountIColumnValue varchar,IamountIColumnFormula varchar,IcurrencyIColumn varchar,IcontactIinfoIColumn varchar,IpersonsInameIComment varchar,IowingIComment varchar,IownerIComment varchar,IamountIComment varchar,IcurrencyIComment varchar,IcontactIinfoIComment varchar,IpersonsInameIFontColorID char(5),IowingIFontColorID char(5),IownerIFontColorID char(5),IamountIFontColorID char(5),IcurrencyIFontColorID char(5),IcontactIinfoIFontColorID char(5),IpersonsInameICellColorID char(5),IowingICellColorID char(5),IownerICellColorID char(5),IamountICellColorID char(5),IcurrencyICellColorID char(5),IcontactIinfoICellColorID char(5),IpersonsInameIBold yesno,IowingIBold yesno,IownerIBold yesno,IamountIBold yesno,IcurrencyIBold yesno,IcontactIinfoIBold yesno,IpersonsInameIUnderLine yesno,IowingIUnderLine yesno,IownerIUnderLine yesno,IamountIUnderLine yesno,IcurrencyIUnderLine yesno,IcontactIinfoIUnderLine yesno)

    If I strip it down to the following
    create _ow_table (IpersonsInameIColumn varchar)
    I still get the errors

    I took the long statement above and went in MSaccess and run it directly from there and the table gets created successfully!!
    I ran a compact and repair on the database.
    This was working before, and now it is working only if I run it against the database, so can anyone help?

    Thanks
    Last edited by danitouffaha; 04-14-2025 at 10:48 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How can I programmatically import Excel data into an Access table
    By Castillb in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2013, 08:09 PM
  2. How can I programmatically import Excel data into an Access table
    By Castillb in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2013, 02:19 PM
  3. Trying to access ListBox object programmatically
    By JGPatrick in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2010, 02:30 PM
  4. [SOLVED] How do i create an Access lookup table
    By Webtekr in forum Access Tables & Databases
    Replies: 0
    Last Post: 06-01-2009, 06:12 AM
  5. Create MS Access Table using VBA
    By Webtekr in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2009, 05:09 AM
  6. [SOLVED] how to access excel sheet programmatically?????
    By .NetProf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2006, 01:10 AM
  7. How do I programmatically get access to a picture or graphic?
    By Stumpiana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2005, 01:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1