Forced.... Runtime Code Break

GUIDO22

Registered User.
Local time
Today, 11:22
Joined
Nov 2, 2003
Messages
515
New one on me this is....

I once perhaps had a breakpoint set on a particular line of code in one of my routines behind a form. This breakpoint is now no longer set.

However, in recent days I have noticed when this particular piece of code executes (it is only opening a REPORT!), operation stops and the current line of execution is highlighted much as if it had stopped on a breakpoint. If I Run / F5 from here... all runs as normal and subsequent calls through this routine do not STOP. So, it only ever happens the first time for that database session.

Anyone seen similar - have any ideas how I can prevent it...?

This is Ok if I am using, but if this happens with someone else using in my absence .. is likely to raise an eyebrow...

Thank you
 
Why don't you look to fixing the piece of code instead. Let's see the entire function and tell us what it does.
 
The code is fine .. having worked for the best part of 10 years.....!
.... (but for what its worth)

Private Sub cmdPreview_Click()
Call ShowOrder(acPreview) <----(exec. stops here)
End Sub
 
It doesn't help showing me a call to a function without showing me the actual function. Can we please see the ShowOrder() function itself.
 
??? .... the nesting would mean I need to quote loads of calls....

Private Sub ShowOrder(nPrnMode As Integer)
Dim strNo As String

If cboPONo.ListIndex <> -1 Then
strNo = cboPONo.Column(0, cboPONo.ListIndex)
Else
' user has entered value
strNo = cboPONo
End If

If IsNumeric(strNo) Then
Call DisplayPO(strNo, nPrnMode, (chkPDFCopy.Value = -1), "PURCHASEORDERS")
Else
Call ExclamationMessage("Enter Order No.", "Print Purchase Order")
End If
End Sub

Respectfully, I dont see how this could be too relevant .. nothing has changed on this side of the DB in months/years.....
 
You don't have any error handling in your code. If you have error handling you can make it fail silently. But like I mentioned earlier, it's best we fix the problem.

Can we see DisplayPO? Yes I know it can be quite nested, and please place your code in Code Tags so the indents are retained.
 

Users who are viewing this thread

Back
Top Bottom