I am trying to set up a form that replicates what the Calls form in the Contacts Management template database does.
I have set up two subforms:- a RecordBookMovement subform and a RBNotes subform and placed them in my main 'Calls' form (which is called RecordBookMovements form).
I want users to be able to type information in data view at the top of the form and add notes related to a record showing at the bottom.
The problem that I am having is that when I tab down to the Notes field at the bottom and try to type something in there, I get an error message that says:
You can't assign a value to this object
* The object may be a control on a read-only form
* The object may be a form that is open in Design view
* The value may be too large for this field
I figure this is because the record hasn't been saved yet because if I close out of the form then go back into it, it will let me add text to the Notes field. So I have put code in the OnEnter procedure of the Notes subform that says the following:
...but it still doesn't work. Can anyone shed some light on this for me?
If IsNull(Me![RecordBookID]) Then
Me![RecordBookMovement Subform].Form![ReceiveDate] = Date
DoCmd.GoToControl "RecordBookMovement Subform"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToControl "RBNotes Subform"