Reuben Cummings
reuben at gfconsultants.com
Tue Apr 10 10:46:23 CDT 2007
Recently, in some apps, the error handlers do not seem to be working
properly.
For example, one that I am fighting right now is a line like this...(this is
a extremely simple version of the function)
====================================================
On Error GoTo No_beuDBAGetProp
beuDBAGetProp = db.Properties(strProp)
Exit_beuDBAGetProp:
Set db = Nothing
Exit Function
No_beuDBAGetProp:
On Error GoTo Err_beuDBAGetProp
If beuDBACreateProp(db, strProp) = True Then
Resume 0
Else
Resume Exit_beuDBAGetProp
End If
====================================================
So when the code tries to retreive the property and it doesn't exist it
should goto the No_.. line and start the routine to create the property.
However, it just pops up the standard Access error dialog and stops the code
from running.
I have the same problem in a relinking function where I check for a table in
the BE...
On Error Resume Next
Set rst = db.OpenRecordset(conLinkTable)
Whether the link is good or not it should continue to the next line. Again,
in this case, it stops the code and will not continue.
What's going on?
Reuben Cummings
GFC, LLC
812.523.1017