JWColby
jwcolby at colbyconsulting.com
Tue Apr 10 12:15:54 CDT 2007
This is probably a runtime SYNTAX error. I would guess that you need to use a set statement. Set beuDBAGetProp = db.Properties(strProp) Or... The property being returned is not the correct type defined in the property statement - returning a long when the property is expecting to return a currency, something like that. Or... Do a decompile / compile . Compact / repair. Or... Jump up and down on one foot, muttering incantations to the right subset of the Access gods, promising never to try anything too complex with Access again... ;-) John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: Tuesday, April 10, 2007 11:46 AM To: AccessD Subject: [AccessD] Error Handler failing - A2K 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com