>At the core of my database application is a Form+Grid class. Launched with this browse-screen grid class is a toolbar and a grid-specific menu with tools that relate to the active module. It all looks a bit like an Excel worksheet. Occasionally, when the grid form is closed and my main database menu returns, the program gives the error 'DBGRID is not an object' - where DBGRID is the name of the said form+grid class. The debugger shows the program is trying to execute a bit of code that refers to DBGRID - that was in fact carried out whilst the grid was open, for example, something done by one of my toolbar buttons or my grid menu tools options. Almost as if it didn't properly leave the offending function. I wonder if it's a read events issue? Any ideas? It's driving me nuts trying trace it!
Insert a validation code before you actually execute the dbgrid code as such:
IF VARTYPE(dbgrid) = 'O' AND !ISNULL(dbgrid)
ELSE
debug
suspend
ENDIF
ramil
~~ learning to stand still