Memo Field Problem

  • Thread starter Thread starter R Bolling
  • Start date Start date
R

R Bolling

I have an MS Access 2000 form with a memo field. What I am trying to
do is when you double click it, it goes to the beginning of the next
blank line and stamps the Date/Time.

So far I have I am using the following code:

Me!Notes = Notes & " ~ ~ ~ " & Now() & " :"

This works, but when you double-click, it begins immediately after the
last input. Is there a way to skip a line so that a new entry begins
one line below the end of the last text. Any help appreciated.

Thank you,

Robbie Bollinger
 
R Bolling said:
I have an MS Access 2000 form with a memo field. What I am trying to
do is when you double click it, it goes to the beginning of the next
blank line and stamps the Date/Time.

So far I have I am using the following code:

Me!Notes = Notes & " ~ ~ ~ " & Now() & " :"

This works, but when you double-click, it begins immediately after the
last input. Is there a way to skip a line so that a new entry begins
one line below the end of the last text. Any help appreciated.

Me!Notes = Notes & vbCrLf & " ~ ~ ~ " & Now() & " :"
 
I have an MS Access 2000 form with a memo field. What I am trying to
do is when you double click it, it goes to the beginning of the next
blank line and stamps the Date/Time.

I'd have to question this design! It seems you have a One (record) to
Many (notes) relationship. I'd very strongly suggest using a <ahem>
one to many relationship, between your current table and a Notes table
(with a link to your table, a date/time field defaulting to Now(), and
a Note field). This can be *displayed* readily with one note per line,
just like your memo field, but will be much easier to maintain.
So far I have I am using the following code:

Me!Notes = Notes & " ~ ~ ~ " & Now() & " :"

This works, but when you double-click, it begins immediately after the
last input. Is there a way to skip a line so that a new entry begins
one line below the end of the last text. Any help appreciated.

Insert Chr(13) & Chr(10) - the two characters which make up a NewLine
in Windows - before the tildes.
 
I forgot to mention that this is a flat file with a memo scratchpad.
The info will be deleted frequently. John -- I appreciate your help
with this.

When I try: Me!Notes = Notes & Chr(13) & Chr(10) & " ~ ~ ~ " & Now() &
" :"

It it does stamp: ~ ~ ~ 9/5/2003 4:19:30 PM : in a new line below --
but the cursor stays on the previous line. Is there a way to have it
focus two spaces after the colon?

Thanks for any help with this.

Robbie Bollinger
 
I forgot to mention that this is a flat file with a memo scratchpad.
The info will be deleted frequently. John -- I appreciate your help
with this.

When I try: Me!Notes = Notes & Chr(13) & Chr(10) & " ~ ~ ~ " & Now() &
" :"

It it does stamp: ~ ~ ~ 9/5/2003 4:19:30 PM : in a new line below --
but the cursor stays on the previous line. Is there a way to have it
focus two spaces after the colon?

Try using " : " as the last string constant, and putting a line

Me!Notes.SelStart = Len(Me!Notes)

after setting its value.
 
Back
Top