By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Retaining comment on form

P: n/a
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 & "'"
Else
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?

dixie

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.