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!

Adding text to a field from

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
I have a form that have a table as record source, in this table there are a text attribute.

What I want to do is add to this field whitout giving the user the oppetunity to edit the text that alredi is in the attribute.

I have been experimenting with a unbound text field in my form, but I have no idea how to add it to the text field.

 
I've done this before using an unbound text box and a button to update the protected field.

txtMain is the text I do not want the user to edit (locked)
txtNew is the unbound text box
cmdUpdate is the command button that will add the New text to Main

On the click event of cmdUpdate

txtMain = txtMain & chr$(13) & chr$(10) & txtNew
txtNew = ""

The chr$(13) & chr$(10) will start a new line before adding the text. In my app I added the username and date to the added text as well.
 
Thanks you it works fine

However I would very much like to knaw how you added the date.
 
Just add str(date()) to the string.


YourString = YourString & str(date())


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top