I have a checkbox on my form, what I would like it to do is that when I
click on the Check box, the memo box that contains notes will have a focus,
go to the next line and add todays date automaticaly and be ready for you to
enter the notes
currently I have
Private Sub cmdOther_Click()
Me.NOTES.SetFocus
End Sub
You can do this with the SelStart and SelLength properties of the
textbox...
BUT!!!!
This is a VERY flawed use of a memo field. It really sounds like
you're stuffing multiple pieces of information - multiple dates, and
multiple notes - into a single memo field. This will be hard to search
(Memo fields cannot be indexed for one thing, and you'll have great
difficulty matching a date up to its corresponding note); memo fields
are prone to corruption, especially when they're frequently updated;
and it violates the basic principle of atomicity.
If you have a one (something) to many (notes) relationship, might you
consider instead modeling it as a one to many relationship? A Notes
table with fields for a foreign key to your table, a date/time field
(defaulting to Date()), and a Text or Memo Note field could be entered
using a Subform; you'ld be able to search individual notes, match them
up with dates, display them neatly on a report, etc. etc.
You should seriously consider this small redesign!
John W. Vinson[MVP]