-
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
-
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?
-
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?
-
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
-
Forum Rules
|
|