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  

Allow additions but disable edits in record fields



 
 
Thread Tools Display Modes
  #1  
Old January 1st, 2007, 03:56 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 8
Default Allow additions but disable edits in record fields

I am looking for a way to allow a user to add data to an existing
record field, but not edit or delete existing information in that
field. Please help!!

  #2  
Old January 1st, 2007, 05:20 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Allow additions but disable edits in record fields

Access 2007 has a new property for Memo fields so you can append only but
not edit/delete existing data in the field.

If this is a memo field in previous versions, you might want to consider
breaking this into a related table. A user can then add more notes (i.e.
another record) at any time, but not edit or delete existing notes. This has
the added advantage that you can track who wrote each not and when.

If neither of those approaches are suitable, you could use two text boxes
for this field:
a) One bound to the field, with its Locked property set to Yes.
b) An unbound one below it, where the user can write their additional
comment.
Use the AfterUpdate event procedure of the unbound text box to append the
value to the bound one, e.g.:
Me.Comment = Me.Comment & vbCrLf & Me.Text1

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
oups.com...
I am looking for a way to allow a user to add data to an existing
record field, but not edit or delete existing information in that
field. Please help!!


  #3  
Old January 1st, 2007, 09:15 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 8
Default Allow additions but disable edits in record fields

Thanks Allen,
The two text box approach works beautifully. I appreciate the help.


Allen Browne wrote:
Access 2007 has a new property for Memo fields so you can append only but
not edit/delete existing data in the field.

If this is a memo field in previous versions, you might want to consider
breaking this into a related table. A user can then add more notes (i.e.
another record) at any time, but not edit or delete existing notes. This has
the added advantage that you can track who wrote each not and when.

If neither of those approaches are suitable, you could use two text boxes
for this field:
a) One bound to the field, with its Locked property set to Yes.
b) An unbound one below it, where the user can write their additional
comment.
Use the AfterUpdate event procedure of the unbound text box to append the
value to the bound one, e.g.:
Me.Comment = Me.Comment & vbCrLf & Me.Text1

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
oups.com...
I am looking for a way to allow a user to add data to an existing
record field, but not edit or delete existing information in that
field. Please help!!


 




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 11:49 AM.


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