Edit sub form record

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.
TarasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
the query "QrySubMain" might not be updatable.
open the query and try to edit records.

see this links for the possible reasons why you can not edit the records
http://allenbrowne.com/ser-61.html
0
TarasAuthor Commented:
This was working before.
0
Rey Obrero (Capricorn1)Commented:
<This was working before. >

so, what changed?
0
PatHartmanCommented:
Using the main table in both the main form recordsource and subform recordsource is what is causing the problem.  It is also directly related to a bug that causes the autonumber to loose its seed and start generating previously used numbers.  There is no reason to include the main table in the subform's query so just remove it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TarasAuthor Commented:
Thanks a lot
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.