Undo won't Undo last function.

gold007eye

Registered User.
Local time
Today, 06:32
Joined
May 11, 2005
Messages
260
I have a Memo box where the user puts comments and then I have a check box that if check automatically puts a specific phrase on the first line of the Memo box (before any other text currently in the box). What I am trying to do is have it so that if the "check box" is UN-checked it will remove the line that it just added to the Memo box. I have been able to get it to undo everything in the Memo box, but what I really need is for it to just undo the last line of text that was enterd when the user checked the box.

Example:

Memo Box:
This is the line that the checkbox just added when the checkbox is set to "True"
This is the test data the user has already put in the box...
==================

User now UN-checks the checkbox (I want the Memo box to read.. see below) Thereby deleting the line "This is the line that the checkbox just added when the checkbox is set to "True""

Memo Box:
This is the test data the user has already put in the box...

How can I accomplish this?
 
You could use the after update event on the combobox.

dim strPhrase as string

strPhrase= [add prhrase]
if me.cmbBox=-1 then
me.txtBox="Add this Line" & me.txtBox
Else
me.txtBox= trim(mid(len(strPhrase),len(me.txtBox)))
end if
 

Users who are viewing this thread

Back
Top Bottom