I want to automatically date stamp a memo/text box when i click a combo box. i know how to start the code bulider in the event properties of the combo box and get it to select the memo/text box i.e combo123.SetFoc us and combo123.Value = today () but what i would like it to do is to go to the end of whatever text is already in the memo/text box, select a new line, date stamp it and select another line ready to add more notes
date stamp a memo/text box automtatically
Collapse
X
-
Originally posted by Ned1966I want to automatically date stamp a memo/text box when i click a combo box. i know how to start the code bulider in the event properties of the combo box and get it to select the memo/text box i.e combo123.SetFoc us and combo123.Value = today () but what i would like it to do is to go to the end of whatever text is already in the memo/text box, select a new line, date stamp it and select another line ready to add more notes
Private Sub MemoField_Enter ()
Me.MemoField = Me.MemoField & " " & Now()
End Sub -
If you want to update the memobox every time you make a selection from a combo box, use the following code:
Private Sub YourCombo_After Update()
Me.MemoField = Me.MemoField & " " & Now()
End SubComment
-
Originally posted by puppydogbuddyIf you want to update the memobox every time you make a selection from a combo box, use the following code:
Private Sub YourCombo_After Update()
Me.MemoField = Me.MemoField & " " & Now()
End Sub
Thanks... just one more thing. The command above leaves the text in the cell highlighted. How do i get it to send the cursor to the end of the text then carriage return to start a new line?Comment
-
Originally posted by Ned1966Thanks... just one more thing. The command above leaves the text in the cell highlighted. How do i get it to send the cursor to the end of the text then carriage return to start a new line?
Private Sub YourCombo_After Update()
Me.MemoField = Me.MemoField & " " & Now() & vbCr & vbLf
End SubComment
-
Originally posted by puppydogbuddyTry this:
Private Sub YourCombo_After Update()
Me.MemoField = Me.MemoField & " " & Now() & vbCr & vbLf
End Sub
thanks again one last thing how do i get the cursor to flash at the end of the text ready to type rather than select and highlight the whole of the text box.Comment
-
Originally posted by Ned1966thanks again one last thing how do i get the cursor to flash at the end of the text ready to type rather than select and highlight the whole of the text box.
Try this:
Private Sub YourCombo_After Update()
Me.MemoField = Me.MemoField & " " & Now() & vbCr & vbLf
Me!MemoField.Se lStart = Me!MemoField.Se lLength
End SubComment
Comment