Update command button

  • Thread starter Thread starter Lilian
  • Start date Start date
L

Lilian

Hi,
I have a primary table to which subforms are connected.
Primary table contains information about the documents
Subforms cointain different parameters to make document evaluation.
I have some problem with evaluationid number in subforms. I need that one
document have different evaluations based on different parametres on the
subforms. To primary table 3 subforms are connected. How to make in subforms
the same number of evaluationid without closing of window. for example
dokumentid number 1 in subforms will be also dokumentid 1 and evalauationid1
the same thing in other 2 subforms. When I closed the data updates and I can
see the same thing in other subforms. How to make a button the updates the
info without closing the form?
Best regards,
 
I do not think that you meant that subforms are connected to a main table,
as that is impossible in Access. I think you may have meant that subforms
from 3 different many-side tables are linked to a main form which fills a
main table. Is that correct? If not post what your exact structure is for
these forms and tables.
 
Hi,

Yes you are right subforms are linked to the main form. How to make the
button that updates the info without closing the window?

Best regards,
Lilian
"Arvin Meyer [MVP]" skrev:
 
Try adding the code:

If Me.Dirty = True Then Me.Dirty = False
Me.Refresh

then requery each of the subforms:

Me.Subform1.Form.Requery
Me.Subform2.Form.Requery
Me.Subform3.Form.Requery

That will save the data on the form, refresh the form and requery the
subforms. Use the click event of a command button, or the after update event
of the last control on your form that you are editing.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
Back
Top