Some months ago, I posted a script I used to enter the current date and time in a memo field of a contact manager application. You can follow all the different ideas posted in the thread by using the Search feature of this Message Board and putting "automatic date entry into memo field" in the search window.
I have since noted a "A5 freezing and crashing" problem using this script that only occurs in records that have many lines (e.g. 35 lines) of conversation notes in the memo/note field. The same button, with the same script, works perfectly fine in the same application, as long as there not a bunch of lines (approx. 35 or more) already filling the memo field.
If you research the previous thread noted above, the procedure in the past was to, in effect, copy the existing notes in the memo field and place the date and time at the beginning or top of the memo field. Basically a "copy and paste" concept. There apparently must be a "memory limit" as to how large a chunk of existing data (notes) can be stored in my previous script procedure as I was recently started having A5 freeze on me when I pressed the "Date and Time Stamp" button; only in records with a large chunk on existing notes.
I have since modified the button script as I found that I could manually enter the date and time in these same records with large amount of existing notes (35 lines +). Thus, I didn't think it was a problem with how much info can be stored in a memo field, but the (copy/paste/add the current date and time) script itself was the culprit.
Below is my current Date and Time Stamp button script, which basically uses a bunch of sys_send_keys to duplicate manually typing in the date and time. It works great. It's pretty simple and direct. I'm always open to hear of suggestions. I post this script because I know others use A5 for contact management and a Date/Time Stamp notation to a memo/notes field is important and handy.
''XBasic
'Puts the Date and Time Stamp at TOP = BEGINNING of memo field
'The following is the button script to put the date and time
'in a memo field
'This time stamps each new entry of a new conversation
'This form is used as a contact manager
'Definitions follow
':BUYMORE is the form name
'NOTES is the object name of the memo field
'This line brings focus to the notes memo field
:Buymore:NOTES.activate()
'The following lines push existing text down and return the
'cursor to the top left corner of the memo field
sys_send_keys("{Enter}")
sys_send_keys("{Enter}")
sys_send_keys("{UP}")
sys_send_keys("{UP}")
'The next line probably will wrap on this Board.
'This sys_send_keys line needs to be on one line.
sys_send_keys(" "+MDY(date())+" - "+upper(totime(toseconds(time()),11,0))+": ")
'The line above now sets you up with
'the cursor now at the right end of the
'top line of the memo field
'two spaces to the right of the current date and time
'ready for typing new conversation notes ENJOY
I have since noted a "A5 freezing and crashing" problem using this script that only occurs in records that have many lines (e.g. 35 lines) of conversation notes in the memo/note field. The same button, with the same script, works perfectly fine in the same application, as long as there not a bunch of lines (approx. 35 or more) already filling the memo field.
If you research the previous thread noted above, the procedure in the past was to, in effect, copy the existing notes in the memo field and place the date and time at the beginning or top of the memo field. Basically a "copy and paste" concept. There apparently must be a "memory limit" as to how large a chunk of existing data (notes) can be stored in my previous script procedure as I was recently started having A5 freeze on me when I pressed the "Date and Time Stamp" button; only in records with a large chunk on existing notes.
I have since modified the button script as I found that I could manually enter the date and time in these same records with large amount of existing notes (35 lines +). Thus, I didn't think it was a problem with how much info can be stored in a memo field, but the (copy/paste/add the current date and time) script itself was the culprit.
Below is my current Date and Time Stamp button script, which basically uses a bunch of sys_send_keys to duplicate manually typing in the date and time. It works great. It's pretty simple and direct. I'm always open to hear of suggestions. I post this script because I know others use A5 for contact management and a Date/Time Stamp notation to a memo/notes field is important and handy.
''XBasic
'Puts the Date and Time Stamp at TOP = BEGINNING of memo field
'The following is the button script to put the date and time
'in a memo field
'This time stamps each new entry of a new conversation
'This form is used as a contact manager
'Definitions follow
':BUYMORE is the form name
'NOTES is the object name of the memo field
'This line brings focus to the notes memo field
:Buymore:NOTES.activate()
'The following lines push existing text down and return the
'cursor to the top left corner of the memo field
sys_send_keys("{Enter}")
sys_send_keys("{Enter}")
sys_send_keys("{UP}")
sys_send_keys("{UP}")
'The next line probably will wrap on this Board.
'This sys_send_keys line needs to be on one line.
sys_send_keys(" "+MDY(date())+" - "+upper(totime(toseconds(time()),11,0))+": ")
'The line above now sets you up with
'the cursor now at the right end of the
'top line of the memo field
'two spaces to the right of the current date and time
'ready for typing new conversation notes ENJOY
Comment