473,703 Members | 2,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem concatenating memo fields in MS access database

I have an access database form where I have a button that is supposed
to be appending the contents of 1 memo field to another is behaving
non-predictably. The code is:

Me![ToDo] = Me![ToDo] & Chr$(13) & Chr$(10) & Me![Studies1] &
Chr$(13) & Chr$(10) & Me![Studies2]
Me![Meds] = Me![MedsEntered] & Chr$(13) & Chr$(10) & Me![IVF] &
Chr$(13) & Chr$(10) & Me![Diet]
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70

Any thoughts on what I'm doing wrong? Could there be a casting problem?
(I just want to append the text of 1 field to another field - am I
actually assigning objects this way?)

Any help would be greatly appreciated.

GH
gh********@yaho o.com

Nov 13 '05 #1
4 2168
I have managed this in a report without the $ sign
e.g.
=[FirstName] & " " & [lastname] & Chr(13) & Chr(10) & IIf([job title] Is Not
Null,[job title] & Chr(13) & Chr(10),"")

It does not use memo fields but I would think they would work OK?

James
<gh********@yah oo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have an access database form where I have a button that is supposed
to be appending the contents of 1 memo field to another is behaving
non-predictably. The code is:

Me![ToDo] = Me![ToDo] & Chr$(13) & Chr$(10) & Me![Studies1] &
Chr$(13) & Chr$(10) & Me![Studies2]
Me![Meds] = Me![MedsEntered] & Chr$(13) & Chr$(10) & Me![IVF] &
Chr$(13) & Chr$(10) & Me![Diet]
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70

Any thoughts on what I'm doing wrong? Could there be a casting problem?
(I just want to append the text of 1 field to another field - am I
actually assigning objects this way?)

Any help would be greatly appreciated.

GH
gh********@yaho o.com

Nov 13 '05 #2
gh********@yaho o.com wrote in
news:11******** **************@ f14g2000cwb.goo glegroups.com:
I have an access database form where I have a button that is
supposed to be appending the contents of 1 memo field to another
is behaving non-predictably. The code is:

Me![ToDo] = Me![ToDo] & Chr$(13) & Chr$(10) & Me![Studies1] &
Chr$(13) & Chr$(10) & Me![Studies2]
Me![Meds] = Me![MedsEntered] & Chr$(13) & Chr$(10) & Me![IVF]
&
Chr$(13) & Chr$(10) & Me![Diet]
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70

Any thoughts on what I'm doing wrong? Could there be a casting
problem? (I just want to append the text of 1 field to another
field - am I actually assigning objects this way?)


What error are you getting?

Do the controls displaying the memo data have the same names as the
underlying memo fields that they display? If so, then you've got an
ambiguity that could cause a problem, since Access may be confused
about whether you are referring to the control or the field in the
record behind the form.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #3
Ted
Also, you may want to change your Chr(10) & Chr(13) commands to just "
& vbCrLf " for Carriage Return and Line Feed.
I would have written it:
Me!ToDo = Me!ToDo & vbCrLf & Me!Studies1 & vbCrLf & Me!Studies2
Me!Meds = Me!MedsEntered & vbCrLf & Me!IVF & vbCrLf & Me!Diet
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord,, acMenuVer70
Ted

Nov 13 '05 #4
"Ted" <be*****@gmail. com> wrote in
news:11******** **************@ g47g2000cwa.goo glegroups.com:
Also, you may want to change your Chr(10) & Chr(13) commands to
just " & vbCrLf " for Carriage Return and Line Feed.
I would have written it:
Me!ToDo = Me!ToDo & vbCrLf & Me!Studies1 & vbCrLf & Me!Studies2
Me!Meds = Me!MedsEntered & vbCrLf & Me!IVF & vbCrLf & Me!Diet
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord,,
acMenuVer7


I'd replace the DoMenuItem with:

Me.Dirty = False

Menus are for people, not for code.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5790
by: euang | last post by:
Hi, I have been using access 2000 for two years on WINDOWS NT to display dynamic aweb page using ASP My ISP has now changed to Windows 2003, and I am having major problems displaying information from MEMO fields within the Access 2000 database. I have not had any problems before displaying MEMO fields on NT and have tried various tips to resolve this issue but no luck so far. I was wondering if anyone had come accross a similar...
6
10472
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo field, and it works. But, it seems wrong since I had to create a huge text box to accommodate memo fields with a lot of text. Thanks for any help, ShyGuy
3
2805
by: BlackFireNova | last post by:
I am working on an Access 2002 Database. I created a new table and imported some notes data into it from an existing table. Now, when I try to create a List Box, and it displays the list of fields to select from, I can see every field in the new table EXCEPT the VNotes field, (which is the one I imported the existing Notes data into). Can anyone help me understand why the existing text notes could be causing Access to make the field...
4
5402
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a memo field When CAN GROW is set to NO everything works just fine. When CAN GROW is set to YES - watch out.... One record causes BIG
9
8158
by: philip | last post by:
If I execute that : Dim Temp as string = "This is a text" Dim sw As StreamWriter Dim fullFileName as string = "c:\text.txt" sw = New StreamWriter(fullFilename) sw.Write(temp) sw.Close() the resulting file 'Text.txt' has the same length than the string 'temp'.
3
3042
by: Joe Salmeri | last post by:
I have found a data corruption problem with pyodbc. OS = Windows XP SP2 DB = Microsoft Access XP PROBLEM: When selecting columns from a table that are of type Memo the value returned is padded with a bunch of null characters at the end.
4
3607
by: kaplan.gillian | last post by:
Hi everyone, I currently have an Access database that includes quite a few long memo fields. When I create a report of my data, Access does not allow the memo fields to be split with the page breaks. In other words, if my memo field is 3 paragraphs long and there is only space on a report page for 2 paragraphs, rather than putting 2 paragraphs on one page and the last one on the next page, all 3 paragraphs are moved to the next page...
10
3053
by: ARC | last post by:
This is mainly a speed question. In this example: I have a QuotesHdr table that has a few memo fields. If these memo fields are used extensively by some users, and if their are a large number of records in QuotesHdr, should I break out the memo fields into a separate table? The thinking here is that, for Quotes selection dropdowns that display all entries in QuotesHdr for selection, I would think that the entire record comes down over...
2
4767
by: steph | last post by:
I have a table with 250 fields. Of course you are wondering why 250 fields... what could I possibly be storing in so many fields? I am using this table as a general import table for files that vary based on user selections. The input files are CSVs and can number from 2 to 175 columns. Each field is usually able to fit into a Text field (< 255 characters) but every now and then a longer field creeps in. since I don't know in which column...
0
8750
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
8662
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9244
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9004
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,...
1
6585
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4421
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...
1
3114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2439
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2058
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.