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!

Coming over from VBA, need some Event and Property equivalents 1

Status
Not open for further replies.

WantsToLearn

Programmer
Feb 15, 2003
147
US
Hello All,

I have done mostly VBA. What are the equivalents for the BeforeUpdate(Cancel), AfterUpdate events for controls in VB? The Validate event fires only when a control loses focus and the Change event is every key stroke so I would have to check for Enter.

Also, in VBA there is a form Dirty property which is reset whenever the underlying data is saved. My VB form is unbound and updated using an ADO command object. Do I have to put code in every control to determine whether or not something has changed? The reason is because I want to prompt if the user closes the form with unapplied changes.
 
As I've said in the past, there are a number of features in Forms 2.0 that we could do with in VB.

BeforeUpdate, AfterUpdate and Dirty are amongst those features. In other words you are out of luck - unless, of course, you add Forms 2.0 to your project (there are some redistribution issues, but you can find advice on this by doing a keyword search in this forum or googling the web)

 
Any suggested work-a-rounds or techniques to use? Thanks!
 
It appears that the Validating and Validated control events correspond to VB/VBA BeforeUpdate and AfterUpdate. Can someone confirm that this is the case? Thanks!
 
I can confirm that that is the case in VB.NET, but not in VB 5 or 6 - which is the forum we are in ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top