I have a database of which 1 field is dedicated to the user ( typing notes) is there anyway I can put the user:ID & Date, into the field automatically each time a user begins to type?
You do not want to put User and Date into SAME field. There are many reasons for this but simply it is true and you really want a separate table to hold your notes. Your parent table (let's assume it is Customers) should have a unique auot-enter FM-generated serial number called CustomerID.
Your new notes table should have auto-enter serial (FM-generated) called NoteID. It should also have CreationDate (auto-enter creation date), User (Auto-enter user account), Note field and CustomerID field.
In your relationship graph, join them as:
Parent::CustomerID = Notes::CustomerID
Still within your relationship graph, below you will see 'allow creation'. Check that on the notes side only.
You can now put a notes portal on your main parent layout. Only place Date, User and Note fields in the portal. Turn off entry to the Date and User fields. Now when someone wants to add a note, they can just begin typing their note directly into the next line of the note field. This creates a new note record and inserts the CustomerID of that main record into the Notes table CustomerID field.
You will end up with limitless notes AND you will have the benefit of searching by date, searching date ranges, generating reports sub-summarized by User and much, much more. :smileyhappy:
Yes, you can. I created a script that does just that (if I'm understanding you correctly).
We have a treatment center for alcohol & drug addiction and a number of people go into the database to enter progress notes, etc. My script goes to the notes field, enters the current date and time, enters the user's name and then puts a dash and is ready for the person to type their notes. My latest script actually pauses until they're done with the note and then when they hit CONTINUE, it provides a signature line.
Go to Layout (select the layout where your notes are)
Insert Text (I started with a paragraph symbol so it would put a blank row between my new note and the last one entered. Make sure not to check "Select All")
Insert Calculated Result Get(UserName) & ", " & Get (CurrentTimeStamp) & " — ")
That's it! After that, my goes on briefly to pause/resume the script and to add paragraph returns and a signature line, but that's how simple it is.
Once your script is done, just place a BUTTON above the Notes field that says "Enter Notes" and when the user clicks that, it'll take their cursor to the next available row (after a space) in the notes field and it will enter the date and time and their name.
Of course you can LaRetta never said you couldn't--only that it's not a good idea and I agree.
Logging multiple entries with several different kinds of information (User ID, Date and Notes) is much harder to work with when it comes to reporting and data display than keeping discreet fields for each type of information in a related table.