469,926 Members | 1,767 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

Retaining comment on form

I have a form where, if a button is clicked (on), I want the current comment
in a form control to remain behind when I click the New Record button. I
have a retainer button called CommentRetainer and the Control I wish to
retain the current comment in is called Comment. The code I am using in my
New Record button click event is as follows:

If Me!CommentRetainer = -1 Then
Me!Comment.DefaultValue = "'" & Me!Comment & "'"
Me!Comment.DefaultValue = "Null"
End If

Occasionally, this results in a #Name? in the Comment Control on the form.
Mostly, it works OK. The field it is bound to is a memo field. It appears
to me to work reliably with Access 2000 (it is written using this program)
but generates problems when run with Access 2003. The problem is that it
works sometimes in Access 2003 and we seem to be able to narrow it down to
the fact it works with smaller comments, but not with larger ones. I have
just counted the number of characters in a comment that causes a problem and
it is only 169. Note, it only seems to do this with memo fields, but a text
field is not large enough to be useful.

Can anyone think of a possible reason for this? Is there another way I can
do what I am trying to do using different VBA?


Nov 13 '05 #1
0 1026

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Suresh Kumaran | last post: by
65 posts views Thread by SamMan | last post: by
2 posts views Thread by Steven T. Hatton | last post: by
2 posts views Thread by cFleury | last post: by
2 posts views Thread by s4lin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.