473,413 Members | 1,764 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,413 software developers and data experts.

append memo to memo

hi, there...new to this access thing...
i have 2 text boxes, set as memos, one called comments and the other notes, they are on a form (and both within a table), where by i can tab between them.
what i want to happen is that when the notes tab is selected, the user can type into this memo, but on clicking off (after update), the text is appened to the text (at the bottom) of the comments memo box. and cleared from the notes box. any help or pointers would be great thanks.
Nov 12 '07 #1
6 1888
missinglinq
3,532 Expert 2GB
This can be done, of course, but a couple of questions first! If you continually clear the "notes" memo field after appending its contents to your "comments" field, why is it a bound to your table? A field that's only used for the duration that a record is open should be unbound.

Secondly, why are you populating your "comments" field in this manner? Are you trying, perhaps, to keep the users from going back and changing comments at a later date? I ask because I have, in a health care database, a routine set up to do this very thing!

Welcome to TheScripts!

Linq ;0)>
Nov 12 '07 #2
hi, thanks for the reply, and yes your spot on thats what im trying to do. the only reason that the notes memo is bound is because it was originally used for something else, so i would unbound it, and remove such field from the table. so again any help would be greatfully recieved. cheers
Nov 13 '07 #3
missinglinq
3,532 Expert 2GB
Now, in this example, there are two memo fields, but only one is bound, since the other memo field is simply a temporary holding area.

NotesMemoField
is unbound, and in the Property Box its Visible Property is set originally set to to No. I place mine side by side with the CommentsMemoField so the user can refer to what's currently in the Comments section while entering new notes.

CommentsMemoField is bound to the underlying table/query, and its Locked Property is set to Yes.

Place a command button on the form. Name it InputData and in the Properties Box set its Caption to Input.

Now use this code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub InputData_Click()
  2. If InputData.Caption = "Input" Then
  3.    NotesMemoField.Visible = True
  4.    NotesMemoField.SetFocus
  5.    InputData.Caption = "Add Data"
  6. Else
  7.    InputData.Caption = "Input"
  8.    If IsNull(Me.CommentsMemoField) Then
  9.       If Len(Me.NotesMemoField) > 0 Then
  10.         Me.CommentsMemoField = Me.CommentsMemoField & Me.NotesMemoField
  11.         Me.NotesMemoField = ""
  12.         NotesMemoField.Visible = False
  13.       Else
  14.         NotesMemoField.Visible = False
  15.       End If
  16.     Else
  17.       If Len(Me.NotesMemoField) > 0 Then
  18.        Me.CommentsMemoField = Me.CommentsMemoField & vbNewLine & Me.NotesMemoField
  19.        Me.NotesMemoField = ""
  20.        NotesMemoField.Visible = False
  21.       Else
  22.        NotesMemoField.Visible = False
  23.       End If
  24.  
  25.     End If
  26. End If
  27. End Sub
Anytime you copy and paste this much code from Access to a post things can go awry; let me know if you have any problems.

Linq ;0)>
Nov 13 '07 #4
this is great. many thanks for you help, will let you know if i have any issues. cheers
Nov 13 '07 #5
hi, having problem with line 18, when using access, click the input data button returns the following error:
Run-time error '438'
object doesnt support this property or method

cheers
Nov 13 '07 #6
also whilst i'm thinking, i want my notes memo to be visible at all time, so the button just needs to append the information in notes to comments, it doenst need to make things visible. cheers again for the help :-)
Nov 13 '07 #7

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

Similar topics

1
by: Rose | last post by:
I have an access 2000 database. In it I have a table OPEN Items which has a field Issue that is setup as a MEMO field. I am trying to append information from another table with the same setup,...
2
by: martinjeffreys | last post by:
Hello I'm using an append query from an Access front end to add data to a back-end SQL table. It all works OK - except a Memo field is being truncated to 765(ish) characters. Any thoughts...
1
by: brino | last post by:
hi all ! i needed to append about 20 fields from a query into the 1 field of another table so that i can produce a report. i tried to do this in an append query but it would not work because i...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
7
by: ARC | last post by:
This is taken from the "What's New in Access 2007" page. However, I've looked through all the properties of a text field memo box, and cannot find the append only option. Does anyone know how to...
10
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...
3
by: nujcharee | last post by:
Hi I have a series of queries, I have a number of temp tables which I use as templates for my data. I start with 1. Delete the data in a temp table 2. Use append query to fill the temp table...
1
by: Bull | last post by:
Hi, Is there a way (besides Case or IIf), to type a value into field1 and have that value added to the value inside a memo or text field? Example: memo/text field has: hello in field1 i...
4
by: Wayne | last post by:
I've been asked to construct a database which will require several memo fields. This database will be the standard frontend/backend mdb configuration. I have read many posts describing the...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...
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
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...

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.