Comment Box and Button

galvinjaf

Registered User.
Local time
Today, 05:32
Joined
Jan 5, 2016
Messages
108
Good Morning,

I'm creating a database, and learning Access as I go along. While I'm a quick study, I can't seem to get my comment box to behave the way that I would like.

Attached is my comment box form. I have a read only comment box to read previous comments, and then I have a New Comment box below that you can type in, followed by an 'Add Comment' button. I can't seem to get my comment button and code to work.

I've also attached the code I'm attempting to use. Any ideas? I'm not a coder, and did not create this code myself, more so, retro fitted it to my field labels, etc.
 

Attachments

  • Add Comment button Code.JPG
    Add Comment button Code.JPG
    48.3 KB · Views: 120
  • Comment Box.JPG
    Comment Box.JPG
    16.7 KB · Views: 99
I have similar boxes on a few forms. I never include the '.Value' part when checking for Nulls.

Don't know if that will help, but it may?
 
I've attempted to try removing them, and continue to get some kind of error. Thanks for the thought!
 
What kind of error or problem do you get ?
I have made a small sample with your code and it works all fine
(Note : i've changed textNewComment = "" into = Null. If you don't do that, the first If (IsNull) would never catch the empty text box. Null <> "")
 

Attachments

Thanks Grumm,

I'm not sure what I was doing wrong. As soon as I copied your code and replaced mine, it worked like a charm. This is a great forum. Thank you!

- J
 

Users who are viewing this thread

Back
Top Bottom