show new information

  • Thread starter Thread starter Frank van Dalen
  • Start date Start date
F

Frank van Dalen

I have a form with an number of subforms with tabs to
controll them . Is their a way to detect if information on
one of the subforms has been added.
 
Use the On Dirty Event of the Form.

And the help from Microsoft about:

"Dirty Event
The Dirty event occurs when the contents of a form or the text portion of a
combo box changes. It also occurs when you move from one page to another
page in a tab control.

Private Sub Form_Dirty(Cancel As Integer)

The Dirty event procedure has the following argument.

Argument Description
Cancel The setting determines if the Dirty event occurs. Setting the
Cancel argument to True cancels the Dirty event. You can also use the
CancelEvent method of the DoCmd object to cancel the event.

Remarks
examples of this event include entering a character directly in the text box
or combo box or changing the control's Text property setting by using a
macro or Visual Basic.

Modifying a record within a form by using a macro or Visual Basic doesn't
trigger this event. You must type the data directly into the record or set
the control's Text property.
This event applies only to bound forms, not an unbound form or report.
To run a macro or event procedure when this event occurs, set the OnDirty
property to the name of the macro or to [Event Procedure].

By running a macro or event procedure when a Dirty event occurs, you can
determine if the record can be changed. You can also display a message and
ask for edit permission.

Changing the data in a record by using the keyboard causes keyboard events
to occur in addition to control events like the Dirty event. For example, if
you move to a new record and type an ANSI character in a text box in the
record, the following events occur in this order:

KeyDown > KeyPress > BeforeInsert > Dirty > KeyUp

The BeforeUpdate and AfterUpdate events for a record occur after you have
entered the new or changed data in the record and moved to another record
(or clicked Save Record on the Records menu), and therefore after the Dirty
event for the record.

Canceling the Dirty event will cause the changes to the current record to be
rolled back. It is equivalent to pressing the ESC key."
 
Back
Top