Hi All,
'Tis my first time posting so I hope I use the right etiquette!
BUSINESS PROBLEM
I work in a Project Management environment and am trying to build a Risk Register for the Project Team.
Users can select a Risk from the Register and track movement by progressively adding comments which are appended to a read-only journal.
As such, the journal provides a permanent audit trail of user comments, actions, changes etc.
SYSTEM PROBLEM
Risks are stored in tblRisks (which contains two memo-type fields - 'Comments' and 'Journal').
Users enter data to tblRisks via frmRisks (txtComments). frmRisks also contains read-only txtJournal.
I want the User to
1. type comments into txtComments,
2. click cmdJournal and then have
2.1 The Comments concatenate to 'Journal' (for viewing at txtJournal)
2.2 The comments at txtComment then being purged post-concatenation.
WHAT HAVE I TRIED SO FAR?
I'm a slave to Wrox's "Beginning Access 2002 VBA" ISBN 0-7645-4402-0.
I've also ploughed through 22 pages of the Access forum on this site.
Finally, I've tried writing the following code which is attached to frmRisks (i.e. as a Form Module).
No result. No error message. Nothing.
================
Private Sub cmdJournal_Click()
Dim db As Database
Dim rec As Recordset
Dim datToday As Date
Set db = CurrentDb()
Set rec = db.OpenRecordset("tblRisks", dbOpenTable)
datToday = Date
'copy the current record to the copy buffer
rec.Edit
'make changes to the current record in the copy buffer
rec("Journal") = rec("Journal") & vbCrLf & "(" & datToday & ")" & rec("Comment")
'save the contents of the copy buffer to disk
rec.Update
UpdateJournal = True
End Sub
================
Does anyone have any thoughts?
With grateful thanks,
Tony Adams
(Melbourne, Australia)
[email protected]