Event when field value change

G

Guest

I'm using Access 2003.

I've created a database that has a front end and a back end. Two copies of
the front end is in use.

In the front end is a form that contains a text box that is bound to control
source. This control source changes from "uptodate" or "updating"
programmatically. So at one point this text box will say "uptodate" or
"updating".

This form also contains command buttons, one of which is an "update" button.

Now what I wanted to do to which I have been unsuccessful is to make the
buttons "disabled" whenever the text box show "updating" when one of the
front ends causes it to do so.

I have thought that the AfterUpdate event will be triggered if this happens,
but in the help file it says that this event is not triggered when the
changes occur via vba.

So is there a way to get around this?

Thanks for all the help I can get.
 
G

Guest

You are correct about the After Update event not firing when a control value
is changed programmatically.
I would suggest you disable the buttons in the same code where you change
the value of the text box. The next issue is when to enable them? That will
depend on how your form operates. If the buttons will remaing disabled until
another record is selected, you could use the form's Current event.
 
G

Guest

Hi Klatuu,

That is a good suggestion. But that would work for the user who actually
activated or called that procedure. You see I have two copies of the front
end. What I wanted that when front_end_1 causes the field in the table on the
back_end to change to "updating", then front_end_2 will have it's buttons
disabled as soon as it sees the field has been changed to "updating".

I hope you understand, my head is swimming just reading what I wrote.

I was hoping that a event will be triggered by this action or else I would
just resort to using the Timer event.
 
J

John Spencer

The only way I can see to do this would be to have a timer event checking a
field value in the backend database. As far as I know, doing something in
one front end can never trigger an event in another front end.

And I don't know of any way to detect events in the database engine (Jet).

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

I'm with John on this. It could be done using timer events and code, but it
would be a big performance hit and very much prone to errors.

I would suggest you do some studying on record locking.
 
G

Guest

Thanks John and Klatuu,

At least I know now that I haven't missed anything. Now I guess my next step
to My MS Access development is record locking.

Using the timer event at this point is the best way for me of tracking any
changes in the records on the backend database until such time I can improve
my database using record locking.

Klatuu said:
I'm with John on this. It could be done using timer events and code, but it
would be a big performance hit and very much prone to errors.

I would suggest you do some studying on record locking.
 

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