how to find subforms not dirty ...

M

Marshall Barton

Ahmed said:
I have main form frm1 it containds two subforms
subfrm2 and subfrm3
I would like how I can code if any of the form
frm1 , subfrm2 , subfrm3 is dirty (editting made to any
control of these forms )

main problem is not when first time data is entered but would like to know
if at all any subform or main form
got dirty before udate of the main form

which events of the form and subform i could use to
popup messege before update of mainform


The logic may get complicated because the Dirty property is
cleared (record is saved) whenever the focus moves between
any of the forms.

I suspect that you will need to create 3 public boolean
variables in the main form's module to keep track of each
form:

Public bolMain As Boolean
Public bolsfm2 As Boolean
Public bolsfm3 As Boolean

Use each form's Dirty event to set the appropriate valiable:

In a subfrm2:
Parent.bolsfm2 = True
In the main form:
Me.bolMain = True

Then you can test the variables to check if any of them was
edited. But, since the othe form records were already
saved, I don't see how this is really useful.
 
A

Ahmed

Hi,
Thanks in advance....
I have main form frm1 it containds two subforms
subfrm2 and subfrm3
I would like how I can code if any of the form
frm1 , subfrm2 , subfrm3 is dirty (editting made to any
control of these forms )

main problem is not when first time data is entered but would like to know
if at all any subform or main form
got dirty before udate of the main form

which events of the form and subform i could use to
popup messege before update of mainform

please help me

arif
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top