Here goes another table question :-)
When you exit a form, which has a table with textTableItems on it, will the
handles to these fields automatically be freed? I wrote up a little
function to handle this, but I get a NULL pointer error when it's used on my
frmCloseEvent. I assume this is caused because the handles were freed. Is
my guess correct?
// the apparently useless function
void FreeHandles()
{
int i, j;
for(i = 0; i < TABLE_ROWS; ++i)
for(j = 0; j < TABLE_COLUMNS; ++j)
if(TableHandles[j][i] != NULL)
MemHandleFree(TableHandles[j][i]);
}
// Example of some code used to load the info to the textTableItem
// foo is used with reckless abandon to remove useless sections
if(TableHandles[column][row] != NULL)
MemHandleFree(TableHandles[column][row]);
if(foo)
{
TableHandles[column][row] = MemHandleNew(StrLen(foo) + 1);
StrCopy(MemHandleLock(TableHandles[column][row]), foo);
}
Timothy D. Astle
People on Jolt cola write the funniest things.
A-10 Obedience Guide,
Kitty Hawk Studios
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/