From: SylvieB on
In Access 2007, I'm using the "column History" feature to maintain a list of
previous comments. On a form, the user will enter some comments in the
"Activity" text box and the column history will return the data with a date
and time stamp. This works great. My question is, how can I clear the
comments the user entered previously in the "Activity" text box next time he
opens the form? The user over a period of time will continue adding comments
and each time he has to manually clear it. That's probably an easy code to
write but I don't know VBA.
Thank you in advance for any help.

From: Jeff Boyce on
Sylvie

How depends on what...

You're describing a form, which in Access, is used to display data that's
stored in one/more tables. What is the table structure for that data?

And on your form, is your [Activity] textbox control bound to any of the
underlying fields? And your [ColumnHistory] ...?

And I'm guessing there's some code behind the [Activity] textbox control
that updates the [ColumnHistory]...?

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"SylvieB" <SylvieB(a)discussions.microsoft.com> wrote in message
news:D4787492-7F07-49D3-894C-FF6729DAD63D(a)microsoft.com...
> In Access 2007, I'm using the "column History" feature to maintain a list
> of
> previous comments. On a form, the user will enter some comments in the
> "Activity" text box and the column history will return the data with a
> date
> and time stamp. This works great. My question is, how can I clear the
> comments the user entered previously in the "Activity" text box next time
> he
> opens the form? The user over a period of time will continue adding
> comments
> and each time he has to manually clear it. That's probably an easy code
> to
> write but I don't know VBA.
> Thank you in advance for any help.
>


From: Jeff Boyce on
Sylvie

Another potential "wrinkle"...

By stuffing a lot of date/timestamped comments into a memo field using that
..ColumnHistory method, you may be making it harder on yourself.

Since there's (obviously!) a one-to-many relationship (many comments related
to ?some record, you might want to consider using a table to hold those
comments. The [Comments] table could be as simple as:

tblComment
CommentID (a PK)
YourTableID (a FK -- to which row does this comment belong)
CommentDateTime (use something like Now() as a default value)
Comment (unless verbose, the 255 character limit in a text field
might suffice)

This way, you can find all the comments related to a given row (in
YourTable).

And the more common way do display this is using a main form (for YourTable
data), and a subform, to display the comments related to the row displayed
in the main form.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"SylvieB" <SylvieB(a)discussions.microsoft.com> wrote in message
news:D4787492-7F07-49D3-894C-FF6729DAD63D(a)microsoft.com...
> In Access 2007, I'm using the "column History" feature to maintain a list
> of
> previous comments. On a form, the user will enter some comments in the
> "Activity" text box and the column history will return the data with a
> date
> and time stamp. This works great. My question is, how can I clear the
> comments the user entered previously in the "Activity" text box next time
> he
> opens the form? The user over a period of time will continue adding
> comments
> and each time he has to manually clear it. That's probably an easy code
> to
> write but I don't know VBA.
> Thank you in advance for any help.
>