Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add to text box

Status
Not open for further replies.

Zorro1265

Technical User
Nov 14, 2000
181
US
I have a text box that is for ammendments to a report. Once the report has been finished this textbox is available for amendments to the report. How can I make the string
"***Ammendment to original report***" automatically be attatched to the feild, preferablly with a carriage return so the text appears on the next line down from my string.
Zorro
 
Here is a little something I came up with. Someone may have something better.

1. In the textbox's property window, goto the Other Tab.

2. For the Enter Key Behavior property choose "New Line in Field".

3. Goto the Event Tab for the text box and in the Key Press Event put the following code:

If KeyAscii = vbKeyReturn Then
SendKeys "***Ammendment to original report***"
End If

This will add the add the line when the user hits enter after putting info in the text box. However, if they do not hit enter this will not fire. I was kinda getting you in the ballpark. Not exactly sure how your field gets updated or what happens next.

Hope this points you in the right direction...B-) ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top