I ino_mart Registered User. Local time Yesterday, 20:49 Joined Oct 7, 2009 Messages 78 Sep 12, 2011 #1 All In Access 2007 I have a form with 2 textboxes named "txtText" and "txtPreview". I defined some keywords such as [[First Name]], [[Last Name]], []. [*]There is also a button "Preview" which shows the result in txtPreview where the keywords are replaced by its corresponding values. [*]txtText is bounded with field "Text" in table "tblTemplates". [/LIST] [U]Example[/U] txtText = "The emailaddress of [[First Name]] is [[Email]]. After pressing on "Preview" this displays "The emailaddress of John is John@example.com" in txtPreview [U]Problem[/U] I want to have "txtPreview" updated whilst the user is editing txtText. So with every keypress, that change should also be visible in txtPreview. This can be done by using the "KeyUp"-event. However, as txtText is currently in "edit"-mode, the code keeps using the original value instead of the modified and txtPreview does not show the modified version. Does someone have a solution? Regards Ino
All In Access 2007 I have a form with 2 textboxes named "txtText" and "txtPreview". I defined some keywords such as [[First Name]], [[Last Name]], []. [*]There is also a button "Preview" which shows the result in txtPreview where the keywords are replaced by its corresponding values. [*]txtText is bounded with field "Text" in table "tblTemplates". [/LIST] [U]Example[/U] txtText = "The emailaddress of [[First Name]] is [[Email]]. After pressing on "Preview" this displays "The emailaddress of John is John@example.com" in txtPreview [U]Problem[/U] I want to have "txtPreview" updated whilst the user is editing txtText. So with every keypress, that change should also be visible in txtPreview. This can be done by using the "KeyUp"-event. However, as txtText is currently in "edit"-mode, the code keeps using the original value instead of the modified and txtPreview does not show the modified version. Does someone have a solution? Regards Ino
V vbaInet AWF VIP Local time Today, 04:49 Joined Jan 22, 2010 Messages 26,328 Sep 12, 2011 #2 ino_mart said: Problem I want to have "txtPreview" updated whilst the user is editing txtText. So with every keypress, that change should also be visible in txtPreview. This can be done by using the "KeyUp"-event. Click to expand... It is the On Change event, not the Key Up event and in this event you need to use the Text property not the Value property.
ino_mart said: Problem I want to have "txtPreview" updated whilst the user is editing txtText. So with every keypress, that change should also be visible in txtPreview. This can be done by using the "KeyUp"-event. Click to expand... It is the On Change event, not the Key Up event and in this event you need to use the Text property not the Value property.