save histories to different tables by one button submit

Hi experts
 i used the following method to save the history, Please check the below link.
http://allenbrowne.com/AppAudit.html
I am able to save the history of one table records - but there is another one, which is not updating from the same form,

The function(to save history) is calling from the button submit(save), both original tables are updating with this submit button by running different queries.
And table A history is updating but Table B history is not updating.

Function call for table A history
Call AuditEditEnd("tblInvoiceA", "audTmpInvoiceA", "audInvoiceA", "InvoiceAID", Nz(Me!InvoiceAID, 0), bWasNewRecord)

Function call for table B history
 Call AuditEditEnd("tblInvoiceB", "audTmpInvoiceB", "audInvoiceB", "InvoiceBID", Nz(Me!InvoiceBID, 0), bWasNewRecord)

Both function calls are after the corresponding query updates.

Please help
gtmathewDallasAsked:
Who is Participating?
 
omgangConnect With a Mentor IT ManagerCommented:
We know the function works if passed appropriate values for its expected parameters.  So something must be wrong with this call

Call AuditEditEnd("Employee_Room_Status", "AudTmpEmployee_Room_Status", "AudEmployee_Room_Status", "ID", Nz(ID, 0), bWasNewRecord)

Are you sure Nz(ID, 0) is correct?  Where is ID declared or assigned?
OM Gang
0
 
omgangIT ManagerCommented:
Please post the full button click procedure.
OM Gang
0
 
gtmathewDallasAuthor Commented:
Sure, Please see the attached file, Thanks
History.docx
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
omgangIT ManagerCommented:
Clarification:  in the routine there is no audInvoiceA and audInvoiceB tables but, instead, you have table audRoom and table AudEmployee_Room_Status.  audRoom is being updated but AudEmployee_Room_Status is not.  Is this correct?
OM Gang
0
 
gtmathewDallasAuthor Commented:
Yes that is correct, AudEmployee_Room_Status is not updating
0
 
omgangIT ManagerCommented:
Try setting a break point on this line
For i = 0 To Me.List2Edit.ListCount - 1
then step through the routine to determine why the call to AuditEditEnd isn't being made.

OM Gang
0
 
gtmathewDallasAuthor Commented:
Its calling but not updating the history table
0
 
omgangIT ManagerCommented:
Have you uncommented the
On Error GoTo
statement in the AudEditEnd rountine?  Are any errors being generated?
OM Gang
0
 
gtmathewDallasAuthor Commented:
My bad.. That was the issue.. I really appreciate it Gang.. it was a great help for me..Thanks a lot OM Gang
0
 
omgangIT ManagerCommented:
Cool.  Glad it was something simple.
OM Gang
0
 
gtmathewDallasAuthor Commented:
Yes it is :) Thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.