A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to cut/append data from one field to another



 
 
Thread Tools Display Modes
  #21  
Old December 13th, 2006, 07:44 PM posted to microsoft.public.access.forms
Tank
external usenet poster
 
Posts: 45
Default How to cut/append data from one field to another

Hi Paul,

I studied your comments about placing the date in the comment field text
box, not the History. Please see event procedure revisions below. Doug
Steele’s comments about the physical line that separates the texts is a great
suggestion and makes sense.

In addition to having an Event Procedure for the command button that we
discussed earlier, you will need an Event Procedure for the Comment field
text box. You will have to identify the procedure on the Form’s Property
Sheet on the line: After Update.

COMMENT FIELD TEXT BOX:

Private Sub Comment_AfterUpdate ()

Me.Comment = vbNewLine & String(20, "_") & vbNewLine & Format(Now(), "m-d-yy
h:nn am/pm.") & " " & Me.Comment

End Sub


Either put the code all on one line or add the appropriate line breaks as
mentioned in earlier postings.

- - - - - - - - - - - - - - - - - - - - - - - - - -

HISTORY FIELD TEXT BOX:

Private Sub TransferComment_Click ()

Me.History = Me.Comment & vbNewLine & vbNewLine & Me.History

Me.Comment = vbNullString

End Sub

Again, either put the code all on one line or add the appropriate line
breaks. Me.Comment = vbNullString, of course, goes on a separate line.

You may have to play around with these procedures a bit to get exactly what
you want
- - -
Tank

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.