简体   繁体   中英

Ms access database is updated when the subform on Mainform is updated via vba

I have very strange problem I am working with MS access 2013 a application called "failure Analysis system" through which user can enter a different data for different system.

I have cread a main form to enter a data lets say " Tb_Mainform " and in this Mainform I have also one subform called " tb_subform ". whenever user change one combox in Mainform the subform is updated using

Me.tb_suform.form.recordsoure = query

Me.tb_subform.requery

until now everything is gud subform is also updated. when i click on subform to navigate, it updated the table with half unfilled data.

How can i prevent this. I am opening the main form by using

DoCmd.OpenForm "tb_Mainform", WindowMode:=acDialog, DataMode:=acFormAdd, OpenArgs:=C_ID

PS : Main form and subform using the same database table.

Below is the link with the same problem as mine. it is 6 year old post but i think after that something has to be change in Access until now.

How do I prevent clicks on a subform causing updates on the main form

I have created an unbound form. It contain subforom where I am saving the records manually in vba.

comment by ChrisPadgham helped me a lot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM