Results 1 to 3 of 3
  1. #1
    klnlsu is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    107

    Creating a table in another database using VBA code

    I am trying to create a table in another database in another directory using VBA code. The problem is both the database and the directory it is in have spaces in the names (U:\Material Control\Misc Tables.mdb). I have tried using single quotes and I have tried using brackets around that full location and name, and I receive syntax errors. What is the correct syntax please?

    Follow up question...I have linked this table in this other database in my local database. This table is recreated every time we run this process. When the table is deleted and recreated, will my link be lost?



    Thanks in advance!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Try it and find out. My test shows the link is restored. However, better process would be to just delete records and then insert new set.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    klnlsu is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    107
    Good idea. I will do that. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating a VBA code
    By Esmatullaharifi in forum Programming
    Replies: 2
    Last Post: 01-03-2015, 02:10 PM
  2. Replies: 2
    Last Post: 11-06-2013, 10:43 AM
  3. Issue creating a table in code
    By Newby in forum Access
    Replies: 5
    Last Post: 12-27-2012, 03:00 PM
  4. VBA code for creating new record
    By Naveen Marapaka in forum Programming
    Replies: 3
    Last Post: 12-23-2012, 02:13 PM
  5. Replies: 2
    Last Post: 08-05-2012, 06:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums