General discussion

Locked

Access BeforeUpdate event fires too soon

By john_wills ·
I am inputting a new record on a screen whose data source is just one table. There are in the VB some Recordset references to other tables, but the referring control on the screen is unbound. When I have input 6 items, starting with the index and only required item, control enters the Form_BeforeUpdate procedure, although there are further controls on the screen for the record. It does not matter whether tabbing is to one of the further controls, to a combo box on another table(using the index from this screen) or to a subform contining two controls for this table.
How do I arrange that the BeforeUpdate event be triggered only when the user has entered all the items, or at least passed through them?

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access BeforeUpdate event fires too soon

by Stillatit In reply to Access BeforeUpdate event ...

The problem is that when you change the value of a bound control, it updates the record immediately. To do what you want to do you would have to use all unbound controls (local variables), and have an "Update" button that updated the record.

Goodluck.

Collapse -

Access BeforeUpdate event fires too soon

by john_wills In reply to Access BeforeUpdate event ...

This does not really help me in the current problem, but it is a good idea and a useful enhancement of my consciousness.

Collapse -

Access BeforeUpdate event fires too soon

by john_wills In reply to Access BeforeUpdate event ...

Stillatit's remarks seem to fit what I have been learning otherwise. Not all things can be said in all languages.

Collapse -

Access BeforeUpdate event fires too soon

by sl-campbell In reply to Access BeforeUpdate event ...

Try setting a module level boolean, bDoNotUpdate, to True until you are ready to update the bound control, or when it gets focus, and then set it to false. In the Before_Update event, check if it is true, and if so then set the events Cancel to trueand exit the sub.

Collapse -

Access BeforeUpdate event fires too soon

by john_wills In reply to Access BeforeUpdate event ...

This too enlarges my consciousness. My real problem was that I was doing things BeforeUpdate that really belonged AfterUpdate.

Collapse -

Access BeforeUpdate event fires too soon

by john_wills In reply to Access BeforeUpdate event ...

This question was closed by the author

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Forums