Results 1 to 3 of 3
  1. #1
    IIBRAHIM is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    7

    Adding a New Column to an existing MS Access table using VBA and assign a value

    I have an existing ms access table.


    I want to use VBA to append a new field (column) with the DataType as Short Text and assign a value of "Imported" into that field. It should not be a mandatory or required field.




    Kindly assist with the appropriate VBA Code.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Edit table design,add field, save.
    no need for vb.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Why would you want to program this?

    Use ALTER TABLE action SQL or DAO TableDefs. Common topic, search web for examples.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 11-24-2021, 06:50 PM
  2. Replies: 1
    Last Post: 09-08-2020, 01:09 AM
  3. Replies: 2
    Last Post: 03-07-2019, 07:47 AM
  4. Replies: 3
    Last Post: 07-28-2011, 11:24 AM
  5. Adding records to existing table
    By Mclaren in forum Programming
    Replies: 5
    Last Post: 05-18-2011, 12:44 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