Solved Form with tab control inside subform in datasheet view- how to update data

lacampeona

Registered User.
Local time
Today, 20:02
Joined
Dec 28, 2015
Messages
392
Hello
I have a form with several tab controls. Each tab control has a subform who is in datasheet view.

1.
From form frmGMKolutKapilare I choose ID record and then open a form with that specific ID.

1666800550779.png


2.
that form has several tab controls and On that form I have a button and I Use that button to copy (3) some fields from that specific ID 13 and enter new data.

1666800686290.png



4. I enter data in my new ID 14.
1666800875685.png



5.
How to automaticly update data when I finish entereing data in the form? Now i have to open and close and then I see the new record ID 14.

1666800942436.png
 

Attachments

  • 1666800829064.png
    1666800829064.png
    108.1 KB · Views: 186
Yes but where to put requery?
On which form? which event?
on close? on got focus? on current?
I try it and for now nothing ... :cautious:
 
Hi Pat
How I run separate requery?hmmmm
Now I put it on the AfterUpdate event on my first subform? and now?
 
If you open the form as acDialog , the code on the calling form is paused until you close the first form.
So something like this in the frmGMKolutKapilare

Code:
DoCmd.OpenForm "yourSecondForm", acNormal, , WhereClauseGoesHere, acFormEdit, acDialog

Me.Requery

The Me.Requery won't happen until the second form is closed.
 
Last edited:
Can you show your code for how you are opening the second form?
It shouldn't need to change, you just need to add the acDialog part to it.
 
Hi
yes
this is
hmmmmm
Private Sub IDKolut_Click()
DoCmd.OpenForm "frmVnosKolutaKapilare", , , "IDKolut = " & Me!IDKolut, acFormEdit
End Sub
 
So the new version should be

Code:
Private Sub IDKolut_Click()

  DoCmd.OpenForm "frmVnosKolutaKapilare", , , "IDKolut = " & Me!IDKolut, acFormEdit , acDialog
  Me.Requery

End Sub
 
Ok
So the new version is
Private Sub IDKolut_Click()

DoCmd.OpenForm "frmVnosKolutaKapilare", , , "IDKolut = " & Me!IDKolut, acFormEdit , acDialog
Me.Requery

End Sub
what abut this you say earlier

I also have to use that? on the frmGMKolutKapilare Which event? hmmmm

DoCmd.OpenForm "yourSecondForm", acNormal, , WhereClauseGoesHere, acFormEdit, acDialog

Me.Requery
 
Thank you both Pat and Minty
I first try Pat solution and didnt work hmmm or maybe I didnt make it correct 🤔
and then I try Minty solution and now is working.
thank you experts
 
Hi Pat
yes now I see the difference between an actual subform and a "pop up form".

I saved both solutions in my "collection" so If someday I will need i have also that solution.
thank you again for you explanation.
you experts are so nice and full of knowledge. You are like doctors you know exatly what is the reason and solution.
thank you
 

Users who are viewing this thread

Back
Top Bottom