Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Northern, NJ, New Jersey, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Add Form Name? (2000 (SR1))

    I have the following code (thanks to this BBS) that adds text from [temp_memo] and the cuttent Date to a [comments] field.

    Private Sub Command90_Click()
    If Len(Me![Temp_Memo]) > 0 Then
    Me![Comments] = Format(Now, "mm/dd/yy hh:mm") & ": " & Me![Temp_Memo] & vbNewLine & Me![Comments]
    Me![Temp_Memo] = ""
    Me.Refresh
    End If
    End Sub


    This combination of comment boxes appears on multiple forms so I would also like this code to add the name of form in which the comment was submitted.

    Can it???
    There is always a way.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Add Form Name? (2000 (SR1))

    Private Sub Command90_Click()
    If Len(Me![Temp_Memo]) > 0 Then
    Me![Comments] = Me.Name & " " & Format(Now, "mm/dd/yy hh:mm") & ": " & Me![Temp_Memo] & vbNewLine & Me![Comments]
    Me![Temp_Memo] = ""
    Me.Refresh
    End If
    End Sub

    You could also use Me.Caption if you have set one.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •