Dates and Memo fields

  • Thread starter Thread starter Marcus G.
  • Start date Start date
M

Marcus G.

Hi all, thanks for looking.

I need to have a button that will enter the current date in a memo field.

I need to be allowed to enter the date (by clicking on this button) anywhere
within the text contained in the memo field.

Any ideas? Thanks,

Marcus
 
Marcus G. said:
Hi all, thanks for looking.

I need to have a button that will enter the current date in a memo field.

I need to be allowed to enter the date (by clicking on this button) anywhere
within the text contained in the memo field.

The problem is when you click on the button you will no longer be in the memo
field. It might be easier to click on a label or use a pop-up menu so that the
control doesn't lose focus. The SelStart and SelLength properties can be used
to determine where the cursor is so the date can be inserted there.
 
I need to have a button that will enter the current date in a memo field.

Ctrl-semicolon will do this. You could do some VBA code to do it as
well, but I'm not certain how you would retain the memory of where the
cursor is when you change focus to a command button!
 
Thanks for the advice.

I simply created a macro with the sendkeys statement as ctrl; and added it
to my shortcut menu - works great!

Thanks again, Marcus G.
 
Back
Top