Total Newbee

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am wanting a form with only two fields - Todays_Comments and All_Comments
with a single button that on clicking will:

Add the current date and the contents of the Todays_Comments field and add
it to the existing contents of the All_Comments field and then delete the
todays_comments field.

Any help greatly appreciated.
 
Call your button AddComments, then

Private Sub AddComments_Click()
If Not IsNull(Me.Todays_Comments) Then
Me.All_Comments = All_Comments & " " & Date & " " & Me.Todays_Comments
Me.Todays_Comments = " "
End If
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
I am wanting a form with only two fields - Todays_Comments and All_Comments
with a single button that on clicking will:

Add the current date and the contents of the Todays_Comments field and add
it to the existing contents of the All_Comments field and then delete the
todays_comments field.

Any help greatly appreciated.

I think you're making a mistake here, Bruce.

It sounds like you're treating a Memo field as if it were a table, with
multiple comments, each with a date and a comment.

You'll find that searching this data structure for the comments on a
particular date, or to find the date for a specific comment, will be almost
impossible. Similarly, displaying the comments for a range of dates will be
all but impossible.

I would suggest instead having a Comments table related one to many to
(whatever table it is that you're commenting on), displayed in a Subform. This
Comments table would have a foreign key field to the main table; a date/time
field CommentDate defaulting to Date(); and a memo field for that day's
comments. A Continuous Subform will let you see (and scroll through) any
desired number of days' comments; you can search independently by the comment
or by the comment date; you can generate reports...

Fields should be "atomic" (storing a comment). You're trying to make a field
into a whole table... and you'll regret it.

John W. Vinson [MVP]
 
John is right on in his warnings, Bruce. In the health care industry, I've
used memo fields extensively and successfully, and they work fine as long as
they're used for memos (read that *notes*) as intended. But if there's any
chance that somewhere down the line you're going to want to do any data
manipulation with them, searching for dtaes or key words, etc. you'd be
better following John's advice.
 
I do see what you mean but the use of this is so limited it should be OK. The
memo field is for storing confirmation of the taking of 2 telephone
references on new employees. The firm only take on about 50 people a year and
the content does not have to be searchable.
 
Back
Top