Combo box statement bank

  • Thread starter Thread starter HilcrRWise
  • Start date Start date
H

HilcrRWise

I have a bank of statements in a table that is connected to a combo bo
on a form, also on the form is a memo field. What I want to beable t
do is click on the combo box and select a statement, this statement i
then copied in to the memo field, ideally to wherever the cursor wa
when the combo box was selected but if this is not possible, to the en
of any text currently in there
 
I have a bank of statements in a table that is connected to a combo box
on a form, also on the form is a memo field. What I want to beable to
do is click on the combo box and select a statement, this statement is
then copied in to the memo field, ideally to wherever the cursor was
when the combo box was selected but if this is not possible, to the end
of any text currently in there.

Here's some code to do the latter: I'm not sure if you can trap the
current cursor position since the combo box has the focus, not the
memo textbox.

Private Sub cboStatement_AfterUpdate()
Me!txtMemofield = Me!txtMemoField & "; " & Me!cboStatement
End Sub

If you want a new line instead of a semicolon use vbCrLf in place of
"; ".
 
Back
Top