C
Capt Jim Cook
I want to append text to a "Comments" memo field. The table only has two
fields: Order# and Comments (this table will be related to a linked table
from another database because I don't have authority to modify the other
table).
I thought I would have a simple form that has a text box for the record ID,
a text box to enter text and a text box to show the contents of the Comments
data element. The user will type in the record ID then type the text to be
appended then push a button and the current date & time and text will be
appended to the Comments.
There are a few standard phrases, so I wanted command buttons (eg. "Waiting
for QDR") to simplify data entry. I coded the On Click event:
Private Sub cmdWaitQDR_Click()
txtAdd.Text = "Waiting for QDR"
End Sub
When I click the button, I get a "Run-time error '2185': You can't
reference a property or method for a control unless the control has the
focus."
What have I done wrong? Would it be better to do this with a Combo Box that
is preloaded with common phrases?
I realize that I will need another command button to concatenate the date
and time to this textbox.text and then append to the [Comments] field before
adding the record to the table.
Thanks
fields: Order# and Comments (this table will be related to a linked table
from another database because I don't have authority to modify the other
table).
I thought I would have a simple form that has a text box for the record ID,
a text box to enter text and a text box to show the contents of the Comments
data element. The user will type in the record ID then type the text to be
appended then push a button and the current date & time and text will be
appended to the Comments.
There are a few standard phrases, so I wanted command buttons (eg. "Waiting
for QDR") to simplify data entry. I coded the On Click event:
Private Sub cmdWaitQDR_Click()
txtAdd.Text = "Waiting for QDR"
End Sub
When I click the button, I get a "Run-time error '2185': You can't
reference a property or method for a control unless the control has the
focus."
What have I done wrong? Would it be better to do this with a Combo Box that
is preloaded with common phrases?
I realize that I will need another command button to concatenate the date
and time to this textbox.text and then append to the [Comments] field before
adding the record to the table.
Thanks