John,
Wiping the egg from my face, I hate working on other people's code! Two forms with very similar names and the exact same design. Of course I put the breakpoint in the one that wasn't executing. It's no wonder the event wasn't firing! I put the code in the correct form and it works as expected.
Darrell
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John Viescas
Sent: Tuesday, June 18, 2013 12:28 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Nested Subform Before Update Event Not Firing
Darrell-
Is your code compiled and saved? There's no reason for the event not to
fire otherwise. If you're changing the field in the subform, then it is the
BeforeUpdate event of that form that should fire when you save the record.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>] On Behalf Of Embrey,
Darrell
Sent: Tuesday, June 18, 2013 6:10 PM
To: MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: RE: [MS_AccessPros] Nested Subform Before Update Event Not Firing
John,
I've placed a breakpoint on the main form's before update, the subform's
before update, and the nested subform's before update events. I then changed
the notes field on the nested subform and the code did not hit any of the
breakpoints. Thus my confusion.
Darrell
From: MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>] On Behalf Of John Viescas
Sent: Tuesday, June 18, 2013 11:52 AM
To: MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: RE: [MS_AccessPros] Nested Subform Before Update Event Not Firing
Darrell-
The Before Update event for the form embedded within the subform should be
firing every time the user tries to save a changed record. Are you sure your
Before Update code is in the form that's the subform and not the outer form?
You could put your test in the control's Before Update - that will fire only
when the date gets changed. It won't fire for unchanged data.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From:
MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com><mailto:MS_Access_Professionals%40yah
oogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com><mailto:MS_Access_Professiona
ls%40yahoogroups.com>] On Behalf Of D
Sent: Tuesday, June 18, 2013 5:23 PM
To:
MS_Access_Professionals@yahoogroups.com<mailto:MS_Access_Professionals%40yahoogroups.com><mailto:MS_Access_Professionals%40yah
oogroups.com>
Subject: [MS_AccessPros] Nested Subform Before Update Event Not Firing
Greetings,
I have a subform that tracks quality reviews nested within a subform. The
nested subform has a text box for the completed date of the quality review.
The original developer didn't place any validation edits on the control to
ensure the date entered is a valid date and is not greater than the current
date. Therefore, invalid dates are stored in the database. The users now
want to add the edits to validate the completed date.
I tried adding the edits to the nested subform's before update event.
However, the before update event isn't firing in my testing. I realize I
could put the edit on the control's before update event but, this wouldn't
catch an existing record with an invalid date if the user didn't make a
change to the completion date. So, how do I catch these errors?
Darrell
------------------------------------
Yahoo! Groups Links
The information contained in this communication is highly confidential and
is intended solely for the use of the individual(s) to whom this
communication is directed. If you are not the intended recipient, you are
hereby notified that any viewing, copying, disclosure or distribution of
this information is prohibited. Please notify the sender, by electronic mail
or telephone, of any unintended receipt and delete the original message
without making any copies.
Blue Cross Blue Shield of Michigan and Blue Care Network of Michigan are
nonprofit corporations and independent licensees of the Blue Cross and Blue
Shield Association.
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
The information contained in this communication is highly confidential and is intended solely for the use of the individual(s) to whom this communication is directed. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information is prohibited. Please notify the sender, by electronic mail or telephone, of any unintended receipt and delete the original message without making any copies.
Blue Cross Blue Shield of Michigan and Blue Care Network of Michigan are nonprofit corporations and independent licensees of the Blue Cross and Blue Shield Association.
[Non-text portions of this message have been removed]
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar