Problem with "OnClose"

  • Thread starter Thread starter TommoUK
  • Start date Start date
T

TommoUK

I have what should be, a simple problem to solve but I am banging my head at
the moment!!

I have a routine that runs and once finished, opens up a form (in datasheet
mode). The user can then check the data and add or amend if required. I have
set the "OnClose" event of this form to call a function (through an embedded
macro) that outputs the table behind the form to Excel. If I run this
function on it's own, it works fine. If I run through the whole procedure and
then close Access, it also works fine. However, if I simply close the form,
the function to output the table is not being called.

Help!!!!!!!!!
 
I have what should be, a simple problem to solve but I am banging my headat
the moment!!

I have a routine that runs and once finished, opens up a form (in datasheet
mode). The user can then check the data and add or amend if required. I have
set the "OnClose" event of this form to call a function (through an embedded
macro) that outputs the table behind the form to Excel. If I run this
function on it's own, it works fine. If I run through the whole procedureand
then close Access, it also works fine. However, if I simply close the form,
the function to output the table is not being called.

Help!!!!!!!!!

Hi,

Place a breakpoint to line where you call macro. You can stop the
program at that moment and run macro manually. Looks like, at the
moment you call macro, something is wrong with data it should output
or it might be something similar.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
Back
Top