[AccessD] Suppress System Dialog when closing DataSheet Form

pcs at azizaz.com pcs at azizaz.com
Mon Apr 9 23:50:51 CDT 2007


Hi,

I need help with the following:

I am opening a form called frmDisplay in design mode from 
code that has opened an ado recordset

frmDisplay has 100 text controls named 
TextControl1,
TextControl2,
..
TextControl100

that's all... no code behind form

After opening the Form I set the name of the textcontrols to 
the name of the fields in the ado recordset;
next I set the recordsource of the now named textcontrols to 
the fields in the ado recordset;
then I set the recordset of frmDisplay to the ado recordset;
and I open the Form is Datasheet mode....

So far so good....I can see the ado recordset as a 'table', 
resizing columns etc. .... any unused textcontrols are still 
named TextControl(n) .... all is good!

My problem comes when I am closing frmDisplay using the 
datasheet's close control.

I want to suppress the Access System prompt:

"The Form has been changed etc. do you want to save the 
changes?" Yes(default)  - No - Cancel

The User should just be able to close the Form .....

I've tried to cancel the closing of the Form on the UnLoad 
event - in order to gain programmatic control of the close 
process, but the system prompt has already kicked in by 
then....  If I set warnings to False, I get rid of the 
system prompt, but since Yes is the default - the Form is 
closed with all design changes saved!! not good!!

Any suggestion??

Regards
borge


The User sh 



More information about the AccessD mailing list