Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if a record was modified

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I have a form with 2 tabs in it, each consisting with a different subform.

I want to check before clicking on the other tab, if any changes were made in the current tab.

The only way it prompts the BeforeUpdate Event is when I exit the form completely or change the parent record.

Is there code or function (like if modified) to check if the current tab / record was modified?
 
You may play with the Dirty prooperty

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV

I created a textbox called Pflag in the Form that the OnDirty Event Procedure of the subform populates with a "Y".

I wrote in the OnClick Procedure of the first tab that if PFlag = "Y"

Docmd.runcommand acccmdsaverecord

which would essentially call the OnBeforeUpdate to check for Errors.

When I click on the first tab it does not active the OnClick Event Procedure?

Do you have any suggestions or a different way to go about this method.
 
The click event of a tab does not do what you think it does. You are looking for the change event.
 
There is no OnChange Event when you click on a Tab. Maybe in 2007 but I'm working on 2003.
 
I"m stuck please help me.

There is no OnChange Event Procedure in Access 2003.

The OnClick does not work. So how can prompt if changes were made.
 
Hi zevw!

Try using the OnExit procedure of the subform control. It may not run when you click another tab, but it should run when they try to enter the other subform.

hth

Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
How are ya zevw . . .

Your not clicking in the right area! Your probably clicking on a tab or a tab page. Click just to the right of the last tab in a blank area or click the outline of the conrol. Youll know you have it when the tab controls name pops-up in the [blue]TitleBar[/blue] of the properties window.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top