Results 1 to 6 of 6
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    Programically add changing fields to a table

    Hello,

    I am trying to add fields that keeps changing to a table, this field name is read from an excel file header. However I can only do it to like 8 fields and then an error message pops up that say



    Record is too large, run-time error ‘3047’:

    It was able to do it to the first 8 fields after that the error occurs. The xls file has 50 fields and can be more. Please advise.

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Lets see your code, access table structure, and excel table.

    You're trying to modify the tables structure adding columns dynamically?

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Thanks kd2017 for looking into it. Yes I just figured it out. The reason for that problem was because when I added a field, I made it a character field which in access doesn’t have Char data type. I ended up changing it to text and it works.

  4. #4
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Sorry kd2017, I think I spoke to soon. Now I have another error message. It says “too many fields defined.”

    Don’t know why it work last time. It’s like sometimes it works and other time it doesn’t. I am going to see when I could attach the codes.

  5. #5
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Are you trying to add more than 255 fields to a table? https://support.office.com/en-us/art...8-98c1025bb47c

    I have to admit ether I don't understand what you're doing or what you're doing is pretty strange.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

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

Similar Threads

  1. Replies: 3
    Last Post: 12-02-2017, 02:04 PM
  2. Replies: 2
    Last Post: 11-27-2017, 08:59 PM
  3. Replies: 2
    Last Post: 06-05-2013, 03:18 PM
  4. Replies: 1
    Last Post: 07-06-2012, 05:32 PM
  5. Replies: 11
    Last Post: 09-15-2011, 03:52 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