473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Changing Field type from Text to Memo in Linked Table.

RobH
56
I need to change the field type in a linked table from Text to Memo.

Any thoughts?
Dec 3 '07 #1
6 7341
Rabbit
12,516 Expert Mod 8TB
I need to change the field type in a linked table from Text to Memo.

Any thoughts?
You're going to have to open up the original database. You can't modify table structure of a linked table while it's open in another database.
Dec 3 '07 #2
RobH
56
Actually I have since found you can..

Expand|Select|Wrap|Line Numbers
  1. On Error GoTo Err_RunDDL_DAO
  2.  
  3. Dim dbBackend As DAO.Database
  4. Dim strBackend As String
  5. Dim strDDL As String
  6.  
  7. strBackend = "Path\Fileaccdb"
  8. strDDL = "ALTER TABLE [TableName] ALTER COLUMN FieldName MEMO"
  9.  
  10. Set dbBackend = OpenDatabase(strBackend)
  11. dbBackend.Execute strDDL, dbFailOnError
  12.  
  13. End_RunDDL_DAO:
  14. On Error Resume Next
  15. dbBackend.Close
  16. Set dbBackend = Nothing
  17. Exit Sub
  18.  
  19. Err_RunDDL_DAO:
  20. MsgBox Err.Number & ": " & Err.Description
  21. Resume End_RunDDL_DAO
  22.  
Dec 3 '07 #3
Rabbit
12,516 Expert Mod 8TB
Good to know. I wonder why they don't let you do it by opening it in design view then.
Dec 3 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
In this case you are actually opening an instance of the backend database.
Dec 11 '07 #5
Rabbit
12,516 Expert Mod 8TB
True, although I thought you would have to close the linked database before opening the backend to make the changes.
Dec 11 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
True, although I thought you would have to close the linked database before opening the backend to make the changes.
Good point. Haven't actually tried it this way so who knows :D
Dec 11 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: dixie | last post by:
I have just run into a problem where I have a text box control on a form that is linked to a memo field in a table. When I type a really long comment into the field, it allows me to type it and...
13
by: MLH | last post by:
I have a form with two controls: !! - combo box !! - text box A button on the form tries to run this SQL when clicked... INSERT INTO BodyMsgsSent (ToWhom, BodyText) SELECT DISTINCTROW !! AS...
2
by: Adam | last post by:
I am importing a table from Informix into Access XP via an ODBC connection. In one of the fields, I will need it to allow 4000 characters. In Access help, it shows the data type can be changed to...
4
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
32
by: deko | last post by:
I have a popup form with a textbox that is bound to a memo field. I've been warned about memo fields so I'm wondering if I should use this code. Is there any risk with changing the form's...
1
by: LurfysMa | last post by:
I am working on an electronic flashcard program. Most of the subjects are simple lists of questions and answers. Those seem to be working. Some of the "subjects" have "categories" of questions. ...
2
by: Roger | last post by:
I've got two tables in sql2005 which have an 'ntext' field when I linked the first table in access97 last week using an odbc data source the access-field type was 'memo' when I link the 2nd...
3
by: Kunal Desale | last post by:
Hi, How to insert/update data in foxpro table field having datatype MEMO using Linked Server? I have written sql insert queries in which i have used linked server to insert data into foxpro...
7
by: sphinney | last post by:
I have a datasheet style form with textbox (MyTextBox) that has the Text Format property set to "Rich Text". It is bound to a memo field in a table. How do I change the text or highlight color of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.