I have Main form frmMain and sub form frmsubMain .
frmMain is bound form to table tblMain.
Sub form frmsubMain is bound to query QrySubMain, this query is based on table tblMain and table tblsubmain which are in relation one to many.
Sub form frmsubMain is single type form (single view) with serval fields on, delete button, form navigating button option present.
Problem that I have is somehow I can not set Allowedits on my sub form.
I can delete record on sub form through cmd button that I have on sub form but I can not edit record.
To set up edit and delete record on sub form I use button on main form. I have button “Edit” with this code in:
Me.frmSumMain.Form.AllowEdits = True
Me!frmsubMain!cmdDeleteItemt.Enabled = True
After this I can delete record from sub form using command button on sub form but I can not edit subform record.
I tried to add
Me.frmsumMain.Form.AllowAdditions = True
Me.frmsubMain.Form.AllowDeletions = True
But it did not help.
To mention if I want to add new record on sub form for that I use button on main form.
I have command button “AddItem” that opens new separate form that I use to enter new item info then, save and close that form and then refresh sub form on main form and show that new item on sub form. This works ok.
There is reason that I need to do add new records like that as one of fileds on sub form is big description field .
Just I need to solve that problem with editing existing record on sub form.