Code Not Firing Correctly

I have a database that I've attached.  

I have code in the Audit Status After Update Event that even though the criteria is met, for some reason it never makes it to the Function (SendAuditCompletedRptActionReqWithErrors).

I have type the following in the code so it can be found easily (search for the following in the code to see where I am having the issue).

NOT WORKING PROPERLY
IT IS SKIPPING THIS LINE EVEN THOUGH THE CRITERIA IS MET

It should be firing up the Function (SendAuditCompletedRptActionReqWithErrors) and opening up Outlook after selection Audit Status = Completed.

I know it is the weekend/holiday, but I am in dire need of getting this completed before Monday.   I've looked it over and over and just cannot figure out what the issue is.  I had it working at one point, not sure what happened.,

PLEASE ANY ASSISTANCE WOULD BE GREATLY APPRECIATED.

Thanks,
gdunn59
Audit-Database--12-31-2011---for.accdb
LVL 1
gdunn59Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Problem is rst.EOF is True ... so it goes to error message stating No Current Record ...

mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
ok ignore first post.  The conditions on this line are not being met:

                If Me.frmQuality_Review_Subform.Form.cboAssoc = "Y" Or Me.frmQuality_Review_Subform.Form.cboOpers = "Y" Or Me.frmQuality_Review_Subform.Form.cboImpact = "Y" Then


mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
All of those conditions are No ... so it's skipping that next line ...

mx
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

gdunn59Author Commented:
DatabaseMX:

Yes the conditions are met.  

If one of the Assoc (Y/N) or Opers (Y/N) or Impact (Y/N) is marked as "Y" and Action Required is "Yes" and Audit Status is "Complete" then it should fire off the Function/Code.

The record does meet all that.

gdunn59
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I found the problem ... standby.  You are not referencing the RecordsetClone fields .... standby

mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
In each place you have this sort of line:

If Me.frmQuality_Review_Subform.Form.cboAssoc = "Y" Or Me.frmQuality_Review_Subform.Form.cboOpers = "Y" Or Me.frmQuality_Review_Subform.Form.cboImpact = "Y" Then

change to: (and use actual Field name, not Control name)

If rst![Assoc] = "Y" Or rst![Opers] = "Y" Or rst![Impact] = "Y" Then

and you will be good to go ..

mx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gdunn59Author Commented:
DatabaseMX:

Ok, the strange thing about it is have been able to get it to work about 8 times today/tonight.  Then I will try it again right after, and it doesn't work again.

Thanks,
gdunn59
0
gdunn59Author Commented:
DatabaseMX:

Ok let me change those lines and see what happens.

Thanks,
gdunn59
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Here you go.  Double check the conditions to be sure I didn't hose up cut and paste of rst ....

mx
Audit-Database--12-31-2011---for.zip
0
gdunn59Author Commented:
DatabaseMX:

That seemed to work.

I will test it more tomorrow, and close out the question.

 If I come up with any other issues, I will post another question and would love for you to assist me.  You have been a great help for me with this database.

Thanks again,
gdunn59
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
You are welcome ... and ... ok.
Happy Ho.

mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
So, are we good here ... just checking ...?

mx
0
gdunn59Author Commented:
Thanks, that worked great.  Sorry for the delay in getting back to you.

Thanks again,
gdunn59
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
you are welcome.

mx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.

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.