Enter text into a memo field using a drop down and button (1 Viewer)

locomotion

Registered User.
Local time
Tomorrow, 07:06
Joined
Dec 7, 2005
Messages
25
I have this database which has a comments field which often gets the same text added into it depending on what is in it. what I am trying to do is something similar to signiatures in outlook express.

What the end user wants to do is select from a dropdown box what text they want to add to the field and hit a button and it will insert it into the memo (comments) field in the form without overwriting any of the text they have in there already, they might want to just add one of the sentences or several.

Does anyone have any suggestions on how I might go about this?

/locomotion
 

ShaneMan

Registered User.
Local time
Today, 14:06
Joined
May 9, 2005
Messages
1,224
Maybe in the OnClick event of the cmdButton you could do something like:

Me.MemoField = Me.MemoField & vbCrLf & Me.cboBox

This would allow the Memo field to remain but add whatever is in the cboBox to the end of the Memo.

HTH,
Shane
 

locomotion

Registered User.
Local time
Tomorrow, 07:06
Joined
Dec 7, 2005
Messages
25
hmm, you make a nice point however the problem is that some of this text entry is longer than 255 characters meaning that I would need to relate the dropdown box to a memo record in a table using a primary key of some sort or perhaps a short desc of the phrase
 

ShaneMan

Registered User.
Local time
Today, 14:06
Joined
May 9, 2005
Messages
1,224
Hey Locomotion,

I guess I'm not quite following what you mean. I was taking, by your first post, that the cboBox would have static choices in it (repetative stuff) and that the user would chose a value from it and add it to the memo. Is this not correct?
 

locomotion

Registered User.
Local time
Tomorrow, 07:06
Joined
Dec 7, 2005
Messages
25
What I am having the problem with is the command & vbCrLf &
could you explain what it represents
 

locomotion

Registered User.
Local time
Tomorrow, 07:06
Joined
Dec 7, 2005
Messages
25
The problem with that solution is that I can only use 255 characters.... I am selecting text from a memo field, is it possible to have the primary key as the item to select and then it refers to and inserts the text in the memo field as a whole?
 

ShaneMan

Registered User.
Local time
Today, 14:06
Joined
May 9, 2005
Messages
1,224
Mornin' Locomotion,

The vbCrLf is a carriage return. You could do two of them if you wanted to double space.

I guess I'm still confused. In your first post it sounded like you had a Memo control that you typed data in, but then there would be static choices that could be added, from a cboBox, if the user so chose. You said in your last post that your "selecting text from a MEMO FIELD and inserting the text in the memo field as a whole." This is the part that is confusing to me.

Are you adding data to the end of a Memo control?
If you are, where is this data coming from? Memo? cboBox?

I'm not trying to be a jerk, it's just not as easy for me to see if my mind what you see if front of you.

Shane
 

locomotion

Registered User.
Local time
Tomorrow, 07:06
Joined
Dec 7, 2005
Messages
25
sorry let me explain it a bit better


What I have is a form with a memo field in it

into this memo field I want to add text which is selected from a cbo box which is linked to a table that has the text stored in memo fields

However

When I use the method you suggest I can only insert 255 characters from that cbo box that has the desired memofield of text in it
 

Users who are viewing this thread

Top Bottom