Results 1 to 4 of 4

Thread: Cannot get memo Field in form to record data in table

  1. #1
    Join Date
    Jan 2007
    Posts
    2

    Cannot get memo Field in form to record data in table

    I hope someone can help me.
    I've vreated a form that has 2 memo fields (one to input data and the other to store in a table)
    when I click on teh cmdbutton it shows the data on the stored field however it doesn't record it on the table until I go on the table and manually input some data, then it works fine.

    here is the vb code for the cmd button and the form's record source

    Option Compare Database

    Private Sub AssociateIDSelector_AfterUpdate()
    Me.Requery 'display Notes for selected customer
    End Sub

    Private Sub PostNote_Click()
    If Len(Trim(Me.NoteNew)) > 0 Then
    If IsNull(Me.Notes) Then
    Me.Notes = Date & vbCrLf & Me.NoteNew
    Else
    Me.Notes = Date & vbCrLf & Me.NoteNew & vbCrLf & Me.Notes
    End If
    Me.Dirty = False
    End If
    Me.NoteNew = Null

    NoteNew = Null 'blanks out new note, since it was just appended to Notes entry
    DoCmd.RunCommand acCmdSaveRecord 'forces record save

    End Sub

    Record source

    SELECT tblRMAssociateNotes.* FROM tblRMAssociateNotes WHERE (((tblRMAssociateNotes.[Associate ID])=Forms!frmRMPostAssociateNotes!AssociateIDSelecto r));

    thanks in advance

  2. #2
    Join Date
    May 2006
    Posts
    407
    I don't see anything wrong with your code. If this was my code, the first thing I would do to try to fix the way it is acting would be to move the Me.Dirty = False to down below the DoCmd.RunCommand acCmdSaveRecord line.

    What do you need the Me.Dirty = False for?

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    I've taken the ME.dirty statement out adn moved as you suggested. Still I can't get the data in the memo field to record onto the table
    Is there something else that might be keeping the data from recording into the table?

  4. #4
    Join Date
    May 2006
    Posts
    407
    What do you need the Me.Dirty = False for?

Posting Permissions

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