1
votes

I have a database based on the 'Issues.accdb' template, and I want to modify one of the forms.

In the 'Issue Details' form there is an open text box which appends data to a memo 'Comments' field when the record is saved. The history of this comments field is shown in a locked text box below.

I want to change the behaviour of the form so that instead of the user entering a new comment into an open text field on the form, a command button is clicked and it opens an input box; the comment is then input into this.

I also want to enter validation so that no one can enter a blank comment.

1

1 Answers

1
votes

The quickest way I could see to rigging what you already have to what you requested would be to do this:

Since you already have a bound memo field for the insertion, just make it invisible. In the onClick event for your command button, you'll just populate that memo field with an InputBox with something like

 dim cmt as String
 cmt = InputBox("Please provide a comment.")
 if cmt = "" then 
 msgbox("Comments cannot be empty")
 else
 me.myBoundMemofield = cmt
 docmd.save