Update Events in Split Database?

R

Renraf

I was wondering how I can use BeforeUpdate and AfterUpdate events, or
something similar, in a split database.

I had validation code in the BeforeUpdate event for the record, and it was
working fine until I split the database into front end and back end. Do
Before/After Update events not trigger when you make updates using a
front-end? Is there something I can use instead?

It doesn't make sense to me that I would lose this functionality when I
split the databases, so I hope I am just missing something.
 
K

Keith Wilby

Renraf said:
I was wondering how I can use BeforeUpdate and AfterUpdate events, or
something similar, in a split database.

I had validation code in the BeforeUpdate event for the record, and it was
working fine until I split the database into front end and back end. Do
Before/After Update events not trigger when you make updates using a
front-end? Is there something I can use instead?

It doesn't make sense to me that I would lose this functionality when I
split the databases, so I hope I am just missing something.

Your events are part of your forms so splitting wouldn't stop them working.
Are your tables linked OK? Any errors?

Keith.
www.keithwilby.co.uk
 
R

Renraf

No, everything else works perfectly.

And I was overly vague initially. BeforeUpdate and AfterUpdate functions
still work for controls, but they do not work on the Record level. I'm not
saying the code is gone; it's still there. The event just never gets called.
 
R

Renraf

Of course.

But shouldn't it fire when I make a change to the values in the record and
then navigate to a different record? Because it doesn't. My code worked
before I split the database, and now it does nothing. To test if the event
was actually triggering, I inserted a simple message box in BeforeUpdate, and
it never appeared while I was editing records and navigating between them.

And now other AfterUpdate code is also not executing.

That just leaves me wondering what the hell is going on. Is this just an old
bug that has since been patched? Or some kind of ridiculous fluke?
 
R

Rick Brandt

Of course.

But shouldn't it fire when I make a change to the values in the record
and then navigate to a different record? Because it doesn't. My code
worked before I split the database, and now it does nothing. To test if
the event was actually triggering, I inserted a simple message box in
BeforeUpdate, and it never appeared while I was editing records and
navigating between them.

And now other AfterUpdate code is also not executing.

That just leaves me wondering what the hell is going on. Is this just an
old bug that has since been patched? Or some kind of ridiculous fluke?

Does the event property still contain "[Event Procedure]". Without that
your code for those events is never called.
 
A

Albert D. Kallal

Renraf said:
No, everything else works perfectly.

And I was overly vague initially. BeforeUpdate and AfterUpdate functions
still work for controls, but they do not work on the Record level. I'm not
saying the code is gone; it's still there. The event just never gets
called.

There is no change in this regards. Those events don't fire unless a record
is changed. So, ONLY code that supposed to run when the record is changed
should be placed in those events. So, code does not run unless you modify
the record.....
 
R

Renraf

Unsurprisingly, the issue was not what I thought it was. Apparently when I
used the message box to test the event call last time, I put it somewhere
foolish and led myself down the wrong path. I've got it all figured out now.

Rick Brandt said:
Of course.

But shouldn't it fire when I make a change to the values in the record
and then navigate to a different record? Because it doesn't. My code
worked before I split the database, and now it does nothing. To test if
the event was actually triggering, I inserted a simple message box in
BeforeUpdate, and it never appeared while I was editing records and
navigating between them.

And now other AfterUpdate code is also not executing.

That just leaves me wondering what the hell is going on. Is this just an
old bug that has since been patched? Or some kind of ridiculous fluke?

Does the event property still contain "[Event Procedure]". Without that
your code for those events is never called.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
.
 

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