Access 07 Form Objects

D

DavidS

I have declaration section in MS Access. I have one main form and subforms
attached via tab control. In prior versions MS Access 1997, MS Access 2000 -
any member elements that I had declared as private, example - m_SSN, m_Month,
m_Year - etc would upon opening the main form for the first time be undefined
(as expected), then after I initialized would retain their values for the
subforms until I closed the main form. With Access 2007 - I'm now showing
these values are not being retained! The main form opens - the respective
sub-forms open and initilize, but when I then do processing on subforms -
evertime I come back to the subform the member elements do not persist their
values.
WHAT IN SAM HILL IS GOING ON WITH MS. It appears your mirrorowing how
you've done form setup for ASP.NET - you ALWAYS purge values. DAM!!!!! Don't
you people have a spec that outlines the differences with this 2007 release.
YOU PROMISE THE MOON - PRIOR TO RELEASE - WHEN Developers like myself get the
release - I find it is very UNPROFESSIONAL to work with.

Dam - just "think" MS is out to make money only - your products are on the
decline and are beginning to look for alternate products and OS to support
NYS development.
 
A

Albert D. Kallal

I not aware of any changes in this regards.

Your code should work just fine, and the vars should retain their values.

However, any un-handled error in a97, or a2007 will re-set all values.

So, if you have ANY code that errors out while running, you loose all
values.

So, I would first ensure you using option explicit in your code. I would
ensure that it compiles.

And, you might want to start introducing error handing code into some of
those routines, or consider creating a

accde file (a mde in old terms) out of your file..and that will not loose
variables when an un-handled error occurs.

This loss of variables is the same in the 10+ year old version of access 97,
or access 2007 -- they both behave the same, and you old code should work
the same.

Does your code compile ok?
 
D

DavidS

I've compiled the code - without issue [2007 access platform]. ALSO - code
works perfect in Access 2000, Access 1997.

I've created .accde file without issue for Access 2007 version.

I have DEBUG statements to advise anytime an error trap is encountered.

Again - I'm showing that the variables are RE-INITIALIZED each time the
system goes back and re-opens the form.

In past I would have the following for the Form Open event of a sub-form ...

Sub Form_Open(...)
m_Item = "some value"
End Sub

THIS would only be called 1 time. for the main form and subform. In ACCESS
2007 - it's being CALLED often and hence the m_Item value is constantly reset
to the initial value. THIS WORKS totally different in Access 07 - I've
created a work-around for retaining values of the subforms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top