473,657 Members | 2,450 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Field type from Text to Memo in Linked Table.

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

Any thoughts?
Dec 3 '07 #1
6 7400
Rabbit
12,516 Recognized Expert Moderator MVP
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 New Member
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 Recognized Expert Moderator MVP
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 Recognized Expert Moderator MVP
In this case you are actually opening an instance of the backend database.
Dec 11 '07 #5
Rabbit
12,516 Recognized Expert Moderator MVP
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 Recognized Expert Moderator MVP
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
16689
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 then does save the entire comment to the table. However, when I use a query which includes this field to send to a report, the field is truncated at the old text field limit of 255 characters. I have ascertained that it is happening in the query,...
13
2506
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 MyTargets, !! AS MyList; When the SQL runs, it fails with msg saying "Field length is too
2
3017
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 "memo" and that will allow up to 65,535 characters. After importing the table, I checked the data type and it automatically was set to memo, but with the 255 character limitation. When I attempt to go over 255, it will not allow it. Does...
4
7531
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 can I schwitch back to Hyperlink via VBA because its boring doing it manually often (I import the table each week for doing updates). When I do it manually the hyperlink works well. Thanks in advance.
32
3667
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 RecordSource like this? Am I asking for trouble doing this with a memo field? Thanks in advance. Private Sub cmdNextNote_Click() Dim lngNid As Long If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
1
3632
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. One example is a kind of trivia subject. There are several "categories" such as "geography", "history", etc., like in the Trivial Pursuit game. Each card has a question in each category.
2
3373
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 table today, it is linked as a text(255) field, ditto for the first table if I link it today if I link the 2nd table using access2003 (and the same odbc data source) it is linked as a memo field
3
9381
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 tables. Some fields have datatype Memo and in these fields my data is not getting inserted/updated. My queries contains local tables & dbf tables (Both). I try simple insert query which insert data into one memo field in foxpro editor and sql...
7
15045
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 certain text in the textbox such that the formating is saved in an underlying memo field? My situation is a little different than other posts I read. Most posts show how to find and select certain text in a textbox, and then change the formating...
0
8421
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8518
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8621
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.