Hi all,
I have a form with a sub1 and a sub2.
Most everything is working right. Except this.
I have a "beforeupdate" and an "afterupdate" event on form sub2.
"BeforeUpdate" works great. But, "AfterUpdate" never even executes?
Here's my code...
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Check for "Yes" in any checkboxes
If Me.CLVSend = -1 Or Me.KCYSend = -1 Or Me.MBOSend = -1 Or
Me.NVLSend = -1 Or Me.STLSend = -1 Or Me.TNSend = -1 Or Me.CHQSend =
-1 Then
Me.SendCode = "S"
Else
Me.SendCode = "N"
End If
'Add in keys, etc.
Me.StatusWhenAdded = Me.CNT_STATUS
Me.PICS_ID = [Forms]![frmlist_chooser]![subCompanies].[Form]!
[PICS_ID]
Me.FakeList_ID = Forms.frmlist_chooser.List_ID
Me.qryList_Current_merge_COMP_CODE =
Forms.frmlist_chooser.subCompanies.Form.COMP_CODE
Me.ContactRecordId = Me.RecordID
End Sub
Private Sub Form_AfterUpdate()
'Update Companies list so count of "No. Picked" recalculates
Forms!frmlist_chooser!subCompanies.Form.Requery
End Sub
Like I said, the problem is that the "AfterUpdate" even doesn't even
trigger. Even if I wipe out the entire BeforeUpdate code, it still
doesn't trigger AfterUpdate.
Any ideas?
Thanks,
Jon 3 3165
jonceramic wrote:
Hi all,
I have a form with a sub1 and a sub2.
Most everything is working right. Except this.
I have a "beforeupdate" and an "afterupdate" event on form sub2.
"BeforeUpdate" works great. But, "AfterUpdate" never even executes?
Here's my code...
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Check for "Yes" in any checkboxes
If Me.CLVSend = -1 Or Me.KCYSend = -1 Or Me.MBOSend = -1 Or
Me.NVLSend = -1 Or Me.STLSend = -1 Or Me.TNSend = -1 Or Me.CHQSend =
-1 Then
Me.SendCode = "S"
Else
Me.SendCode = "N"
End If
'Add in keys, etc.
Me.StatusWhenAdded = Me.CNT_STATUS
Me.PICS_ID = [Forms]![frmlist_chooser]![subCompanies].[Form]!
[PICS_ID]
Me.FakeList_ID = Forms.frmlist_chooser.List_ID
Me.qryList_Current_merge_COMP_CODE =
Forms.frmlist_chooser.subCompanies.Form.COMP_CODE
Me.ContactRecordId = Me.RecordID
End Sub
Private Sub Form_AfterUpdate()
'Update Companies list so count of "No. Picked" recalculates
Forms!frmlist_chooser!subCompanies.Form.Requery
End Sub
Like I said, the problem is that the "AfterUpdate" even doesn't even
trigger. Even if I wipe out the entire BeforeUpdate code, it still
doesn't trigger AfterUpdate.
Any ideas?
Thanks,
Jon
If a form isn't "dirty" it won't execute. Put in a
msgbox "In AfterUpdate"
in your code and see if it executes when you add or modify a record.
On Oct 16, 10:24*am, Salad <o...@vinegar.comwrote:
jonceramic wrote:
Hi all,
I have a form with a sub1 and a sub2.
Most everything is working right. *Except this.
I have a "beforeupdate" and an "afterupdate" event on form sub2.
"BeforeUpdate" works great. *But, "AfterUpdate" never even executes?
Here's my code...
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Check for "Yes" in any checkboxes
* * If Me.CLVSend = -1 Or Me.KCYSend = -1 Or Me.MBOSend = -1 Or
Me.NVLSend = -1 Or Me.STLSend = -1 Or Me.TNSend = -1 Or Me.CHQSend =
-1 Then
* * * * Me.SendCode = "S"
* * Else
* * * * Me.SendCode = "N"
* * End If
'Add in keys, etc.
* * Me.StatusWhenAdded = Me.CNT_STATUS
* * Me.PICS_ID = [Forms]![frmlist_chooser]![subCompanies].[Form]!
[PICS_ID]
* * Me.FakeList_ID = Forms.frmlist_chooser.List_ID
* * Me.qryList_Current_merge_COMP_CODE =
Forms.frmlist_chooser.subCompanies.Form.COMP_CODE
* * Me.ContactRecordId = Me.RecordID
End Sub
Private Sub Form_AfterUpdate()
'Update Companies list so count of "No. Picked" recalculates
* * Forms!frmlist_chooser!subCompanies.Form.Requery
End Sub
Like I said, the problem is that the "AfterUpdate" even doesn't even
trigger. *Even if I wipe out the entire BeforeUpdate code, it still
doesn't trigger AfterUpdate.
Any ideas?
Thanks,
Jon
If a form isn't "dirty" it won't execute. *Put in a
* * * * msgbox "In AfterUpdate"
in your code and see if it executes when you add or modify a record.- Hide quoted text -
- Show quoted text -
Thx Salad. I'd tried that, had the msgbox in, had the "brown dot of
shame" clicked on too. As if having both would help.
Nothing.
Then, I remembered the bug(?) where you can have VBA code, but the
control properties window does not say "[Event Procedure]" in it.
So, I clicked the "..." to make it realize the code was there, and
everything's fine again.
Drat. I feel so dumb. *shakes fist with futility at the sky at
whichever Microsoft code lackey hasn't fixed this*
Jon
jonceramic wrote:
On Oct 16, 10:24 am, Salad <o...@vinegar.comwrote:
>>jonceramic wrote:
>>>Hi all,
>>>I have a form with a sub1 and a sub2.
>>>Most everything is working right. Except this.
>>>I have a "beforeupdate" and an "afterupdate" event on form sub2. "BeforeUpdate" works great. But, "AfterUpdate" never even executes?
>>>Here's my code...
>>>Private Sub Form_BeforeUpdate(Cancel As Integer) 'Check for "Yes" in any checkboxes If Me.CLVSend = -1 Or Me.KCYSend = -1 Or Me.MBOSend = -1 Or Me.NVLSend = -1 Or Me.STLSend = -1 Or Me.TNSend = -1 Or Me.CHQSend = -1 Then Me.SendCode = "S" Else Me.SendCode = "N" End If
>>>'Add in keys, etc. Me.StatusWhenAdded = Me.CNT_STATUS Me.PICS_ID = [Forms]![frmlist_chooser]![subCompanies].[Form]! [PICS_ID] Me.FakeList_ID = Forms.frmlist_chooser.List_ID Me.qryList_Current_merge_COMP_CODE = Forms.frmlist_chooser.subCompanies.Form.COMP_CO DE Me.ContactRecordId = Me.RecordID
>>>End Sub
>>>Private Sub Form_AfterUpdate() 'Update Companies list so count of "No. Picked" recalculates Forms!frmlist_chooser!subCompanies.Form.Requery
>>>End Sub
>>>Like I said, the problem is that the "AfterUpdate" even doesn't even trigger. Even if I wipe out the entire BeforeUpdate code, it still doesn't trigger AfterUpdate.
>>>Any ideas?
>>>Thanks,
>>>Jon
If a form isn't "dirty" it won't execute. Put in a msgbox "In AfterUpdate" in your code and see if it executes when you add or modify a record.- Hide quoted text -
- Show quoted text -
Thx Salad. I'd tried that, had the msgbox in, had the "brown dot of
shame" clicked on too. As if having both would help.
Nothing.
Then, I remembered the bug(?) where you can have VBA code, but the
control properties window does not say "[Event Procedure]" in it.
So, I clicked the "..." to make it realize the code was there, and
everything's fine again.
Drat. I feel so dumb. *shakes fist with futility at the sky at
whichever Microsoft code lackey hasn't fixed this*
I've had that happen as well. Glad you gound the solution.
Jon
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kulnor |
last post by:
My hosting company upgraded yesterday to pHp 4.3.10. Since then, all my
INSERT/UPDATE/DELET query on our MS-SQL database seem to fail. No
specific error message is returned by...
|
by: Steve |
last post by:
I have several pairs of synchronized subforms in an application. I have a Delete
button for each pair that uses the following code or similar to delete a record
in the second subform:
...
|
by: CSDunn |
last post by:
Hello,
I have a combo box (Combo7) that needs to call a function during the
After Update event of the combo box. The function resides in an Access
2000 ADP Module called MMAnswerData_code.
The...
|
by: angel duran |
last post by:
Hi... i'm trying to accomplish this and i will be using some pictures
so you can easily follow me along.
I have this form <link>http://img30.exs.cx/my.php?loc=img30&image=4214.jpg</link>
and in...
|
by: Earl Anderson |
last post by:
Using WinXP & AccessXP, I'd like to automatically have the records that I've
just printed in a report automatically updated to have the 'print date &
time' immediately inserted into a 'Date/Time'...
|
by: cefrancke |
last post by:
I'm trying to update some combo boxes and subform data (including their
combo boxes too.) after inserting a record into a different subform.
I insert a record into subformA (tableA is...
|
by: BartonConstruction |
last post by:
Greetings all,
I have a main form (frmClients) with two subforms (subVisits)
(subAccount). I got the subforms to reflect what the main form is
showing by linking master and child fields (I...
|
by: Macbane |
last post by:
Hi,
I have a 'main' form called frmIssues which has a subform control
(named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs.
A control button on the main form opens a pop-up form...
|
by: skips84s |
last post by:
I have a parent form with four tabbed subforms. On subform x, selecting a value from a combo box should update a few controls on this subform, as well as a control on subform y, all done using...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |