Update Memo Value

Muzicmn

Registered User.
Local time
Today, 14:12
Joined
Nov 3, 2002
Messages
78
Is there a way to populate the value of a memo field with the push of a button. What I am trying to do is have a few default items that can be automatically entered into a memo field. When I attempt to change the value of the memo field either thru the wizard, macro or by using a simple code like me.[memofield]="test" I get the error that you cannot assign a value to this object or by using setvalue through a macro i get the error "Object doesnt support this property or method"

Any help with this would be greatly appreciated

Thanks

Ricky
 
Put this behind a command button Name it cmdUpdateMemo, Put the code in the OnClick event of the button, make sure you change the names to suit your database.

Code:
Private Sub cmdUpdateMemo_Click()
Dim strDate As String

strDate = Now()

    Me.[COLOR="Blue"]CusMemo [/COLOR]=Me.[COLOR="Blue"]CusMemo[/COLOR] & Chr(13) & Chr(10) _
    & "=====================" & Chr(13) & Chr(10) _
    & strDate & Chr(13) & Chr(10) _
    & "====================="
    
End Sub

Hope this helps.
 
thanks works great, can you tell me what Chr(13) & Chr(10) stand for

I believe one of them is a carriage return??

thanks again your a life saver

Ricky
 
You have to use the CHR(10) and CHR(13) in queries, but for code it is easier to write and use if you use VbCrLf instead.
 

Users who are viewing this thread

Back
Top Bottom