Insert text into field

B

Bawhead

Hello,

I have a memo box called InfoExtra that I use to keep notes on various jobs
that I do. I want to be able to click a button to add in todays date (for the
notes I write) but in a way that doesn't overwrite the current contents of
the field.

Any ideas?

Thanks
 
A

Allen Browne

You can add today's date to the end of a control named Notes like this:
Me.Notes = Me.Notes & Date

However, you cannot insert the date into the middle of the field where the
cursor is. When you click the button, focus moves to the button first, so it
is no longer at any point in the memo field when you click the button.

It sounds like you are trying to track several notes, with the date of each
one. It would probably be a better approach to create a related table of
notes, with a date field and a memo field, and a foreign key field that
relates to the primary key of your form's table. This would be displayed as
a continuous form in your main form, so you can add as many notes as
necessary, each with its own date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top