Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2008

Tip: Looking for answers? Try searching our database.

Date Stamping & Protecting a Comment Field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam - 19 Jul 2005 16:44 GMT
Hello

I am a little confused on how to do this but....

I have a form field which contains customer information. Also included in
this form is a comments memo field, where the user can write free form
comments/ memos relating to the customer.

I want to do two things:-

1. Have the date automatically appear in the comments box BEFORE the user
starts typing comments

2. I want to protect this field so that comments cannot be deleted or
amended once typed.

Looking at what I want to do, it may appear that I must have a separate form
titled comments that is somehow linked to the main form. I assume that there
would need to be a command button on the main form page that opens the
comments form. Once clicked, it would open up the comments form,
automatically show the days date and allow the user to type in his comments .
Once these comments are saved (by pressing a save & close button in the
comments form) then this data should not be able to be deleted or amended in
any way.

Hope I am not being too confusing??!!

Thanks!
Allen Browne - 19 Jul 2005 16:54 GMT
Create a 2nd table, related to the first, so that one customer can have many
comments over time.

This table will have 3 fields:
   CustomerID    relates to the primary key field of your customsers table.
   NoteDate        Date/Time field, with Default Value of  =Date()
   Note                 Memo field where the user enters the comment.

You can then put a subform on your main form to show the comments for that
customers. On this subform, set AllowAdditions to Yes, AllowDeletions to No,
and AllowEdits to No.

Signature

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.

> Hello
>
[quoted text clipped - 28 lines]
>
> Thanks!
Sam - 20 Jul 2005 01:00 GMT
Hello Allen

The Subtable ETC appear just fine thanks, however I Get the following error
message when I try and enter more than one comment for the customer:-

"The Changes you requested to the table were not successful because they
would create duplicate values in the index, primary key or relationship.
Change the data in the field or fields that contain the duplicate data,
remove the index or redfine the index to allow duplicates and try again"

Dont know what I did wrong???

> Create a 2nd table, related to the first, so that one customer can have many
> comments over time.
[quoted text clipped - 40 lines]
> >
> > Thanks!
Allen Browne - 20 Jul 2005 03:53 GMT
In the comments table, CustomerID cannot be the primary key.

Add another field (AutoNumber) to be the primary key, so that the CustomerID
field can appear many times in this table (i.e. there can be multiple
comments for a customer.)

Signature

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.

> Hello Allen
>
[quoted text clipped - 56 lines]
>> > in
>> > any way.
Sam - 20 Jul 2005 05:56 GMT
Thanks Allen

You sure know your stuff!

> In the comments table, CustomerID cannot be the primary key.
>
[quoted text clipped - 62 lines]
> >> > in
> >> > any way.
TSnow - 17 Jan 2008 14:19 GMT
I have a question for Allen...If I want to combine all the comments into
another comment memo field, in another table, how can I do that sequentially
when there are more than one comment in the original?  I want to do this so
when I run a report for a uunique record that has multiple comments, it will
not create multiple rows of repetitive data...

> Thanks Allen
>
[quoted text clipped - 66 lines]
> > >> > in
> > >> > any way.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.