Hi All,
I have an excel form with text boxes. One of the text boxes is 'Further Comments' and I would like this to hold more than 255 characters.
Is there a way to export this text field to an Access table please?
Thanks,
Danny
Hi All,
I have an excel form with text boxes. One of the text boxes is 'Further Comments' and I would like this to hold more than 255 characters.
Is there a way to export this text field to an Access table please?
Thanks,
Danny
DannyJ,
First of all, for a textbox to hold more than 255 characters, you will have to make it a multi-line textbox.
Yes, sending that data to an Access table is fairly easy, but it would help to have more detail. However, this is the basic approach:
Generally I put my connection strings to the DB in a separate module, since I call them up often:
Then in whatever triggers the upload (like a button on the form), put this code:Please Login or Register to view this content.
Note that the access field's data type will have to be memo and not text to accomodate the string length.Please Login or Register to view this content.
Also, in Excel, in the VBA editor, go to Tools, References, and put a checkmark next to "Microsoft ActiveX Data Objects 6.1 Library" (This will work for 2010 and above, but if your excel is older, you can also use 2.6 or 2.7 instead of 6.1)
Last edited by Arkadi; 07-19-2017 at 09:16 AM.
Please help by:
Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know
There are 10 kinds of people in this world... those who understand binary, and those who don't.
Thank you for your help Arkadi. I will try this tomorrow when I am back in work and feed back.
Worked great thank you.
I am inputting the records different than how you have suggested. Would it be better to do it the way you have suggested?
Here is a snippet of the code I am using:
Please Login or Register to view this content.
No, it is not better to do it my way than yours as far as I know. In my case I don't only work with access but also with our MRP software, which uses a different database. The driver that allows us to connect does not support either of the methods in your code, so I have to actually use sql commands to put data in there, which is why I use my method.
I'm glad you were able to get it going, and well done on finding another way that works well for you
Also, thanks for the feedback, the rep, and for marking the thread as solved... much appreciated.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks