Send Date to a Memo Field

  • Thread starter Thread starter bgreer5050
  • Start date Start date
B

bgreer5050

I have a subform with the following fields:

Status
NoteField

I would like the double click event for Status to do the following:

Change the status to "Ordered"
Change the Notefield to Notefield + The Current Date

I have tried:

Private Sub Status_DblClick(Cancel As Integer)
Status.Text = "ORDERED"
NoteField.SetFocus
NoteField.Value = NoteField.Text & Date
End Sub

I have also tried Notefield.Text in place of NoteField.Value

I can copy text but I cannot get the date into the NoteField field.

Thanks
 
Your code does fail, as stated. I did a little modification, to simplify
things. It's really easier to always use the .Value property for this sort of
thing, because it can be used without the textbox control having focus, and
since .Value is the Default Property, you can simply use the control's name.

This is so weird, though! I did all kinds of variations, setting focus,
changing the order of the code lines, etc, and I never could get the code to
work in the DoubleClick of the Status control. But it works just fine in the
DoubleCheck event of the NoteField control! I have no idea why this is, but
hope this slight variation will work for you!

Private Sub Notefield_DblClick(Cancel As Integer)
Status = "ORDERED"
Notefield = Notefield & " " & Date
End Sub

Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top