Form Modified Date Changes when opens

G

Guest

I am using Access2003 and have two databases, the problem one is newly
created in Access2003, the other was created in a previous version, I think
2000, but I believe was updated to 2003 before we purchased it. I make
modifications to both.

In both databases, I have created buttons that open forms and occasionally
change settings on that form (like a background color or control enable/lock
parameter). In the newer DB I have noticed that Modified date for several of
the forms changes when the form is opened, and there's no pop-up mentioning
changed or saving of changes. This doesn't happen for any forms in the older
database.

It is something I should be concerned about (corruption?) or something that
may be different due to version changes or some other Access setting? It's
bothersome for me since I can't keep track of which forms were changed
intentionally as part of a programming change and which were simply opened by
someone recently.
 
P

Pieter Wijnen

Probably some kind of
DoCmd.SetWarnings False w/o DoCmd.SetWarnings True

Pieter
 
G

Guest

If the form settings are being changed, that will change the modification date.

See if there is some code that Set Warnings to Off. That will stop the
irritating message boxes about saving the form changes. There might even be
some code that dynamically saves the form after changing the settings.
 
G

Guest

I haven’t seen any code sophisticated enough in either DB to get into
dynamically saving form changes. Certainly not in the new DB which I’ve
done, since I don’t know how to do that. :)

There are some SetWarnings commands, but I searched the whole project and
each False was matched a couple lines later with a True (did notice that
there’s no reset to True in the case of an error).

I’ve even more perplexed now. I put a little code on the Open event of my
Main Menu just to be sure that warnings were On, randomly picked one of the
forms (has a subform) that shows a date change and opened it from the button
on my Main Menu. The date/time changed but the Main Menu code is:

Private Sub Overall_Billing_Summary_Button_Click()
On Error GoTo Err_Overall_Billing_Summary_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Billing Overall Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Overall_Billing_Summary_Button_Clic:
Exit Sub

Err_Overall_Billing_Summary_Button_Click:
MsgBox Err.Description
Resume Exit_Overall_Billing_Summary_Button_Clic

End Sub

…which does do any modifications to the form. And this particular form does
not have any event modules on the form itself, only about a half dozen button
routines to either open other forms (same with its subform). After the
poking around, I opened it again, the exact same way, and the date/time did
not change (a couple times). But I got another form, nearly as simplistic to
change. Code on the Main Menu was identical except for the form name and the
Open event is:

Private Sub Form_Open(Cancel As Integer)
[BaseDate] = NormalizeDate(DateAdd("m", -1, Now()))
Me.Filter = "[rdate] = #" & [BaseDate] & "#"
Me.FilterOn = True
End Sub

I’ve done this same sort of stuff in the other database and the form
Modified date/time never changes. So this alarms me.
 
P

Pieter Wijnen

That's the culprit then.
If something errors out and setwarnings is false, well then warnings are
off.

Pieter

Karen said:
I haven't seen any code sophisticated enough in either DB to get into
dynamically saving form changes. Certainly not in the new DB which I've
done, since I don't know how to do that. :)

There are some SetWarnings commands, but I searched the whole project and
each False was matched a couple lines later with a True (did notice that
there's no reset to True in the case of an error).

I've even more perplexed now. I put a little code on the Open event of my
Main Menu just to be sure that warnings were On, randomly picked one of
the
forms (has a subform) that shows a date change and opened it from the
button
on my Main Menu. The date/time changed but the Main Menu code is:

Private Sub Overall_Billing_Summary_Button_Click()
On Error GoTo Err_Overall_Billing_Summary_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Billing Overall Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Overall_Billing_Summary_Button_Clic:
Exit Sub

Err_Overall_Billing_Summary_Button_Click:
MsgBox Err.Description
Resume Exit_Overall_Billing_Summary_Button_Clic

End Sub

.which does do any modifications to the form. And this particular form
does
not have any event modules on the form itself, only about a half dozen
button
routines to either open other forms (same with its subform). After the
poking around, I opened it again, the exact same way, and the date/time
did
not change (a couple times). But I got another form, nearly as simplistic
to
change. Code on the Main Menu was identical except for the form name and
the
Open event is:

Private Sub Form_Open(Cancel As Integer)
[BaseDate] = NormalizeDate(DateAdd("m", -1, Now()))
Me.Filter = "[rdate] = #" & [BaseDate] & "#"
Me.FilterOn = True
End Sub

I've done this same sort of stuff in the other database and the form
Modified date/time never changes. So this alarms me.


Jerry Whittle said:
If the form settings are being changed, that will change the modification
date.

See if there is some code that Set Warnings to Off. That will stop the
irritating message boxes about saving the form changes. There might even
be
some code that dynamically saves the form after changing the settings.
 
G

Guest

I should perhaps have pointed out in my last post that I had made sure that
Setwarnings was True and I was still having the modified dates for forms
change when the form opens - with no particular pop-ups or warnings. I had
the database window open in the background, it's on the open, not the close
of the form that the date is changed. For a couple of the forms, the forms
themselves are about as simple as it gets (just a little wizard generated
code to call other forms). Other than the newly added commands to insure
that Setwarnings is true, all (6) the Setwarnings commands are part of button
code that is only called by pressing the button. I have really looked to be
sure.



Pieter Wijnen said:
That's the culprit then.
If something errors out and setwarnings is false, well then warnings are
off.

Pieter

Karen said:
I haven't seen any code sophisticated enough in either DB to get into
dynamically saving form changes. Certainly not in the new DB which I've
done, since I don't know how to do that. :)

There are some SetWarnings commands, but I searched the whole project and
each False was matched a couple lines later with a True (did notice that
there's no reset to True in the case of an error).

I've even more perplexed now. I put a little code on the Open event of my
Main Menu just to be sure that warnings were On, randomly picked one of
the
forms (has a subform) that shows a date change and opened it from the
button
on my Main Menu. The date/time changed but the Main Menu code is:

Private Sub Overall_Billing_Summary_Button_Click()
On Error GoTo Err_Overall_Billing_Summary_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Billing Overall Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Overall_Billing_Summary_Button_Clic:
Exit Sub

Err_Overall_Billing_Summary_Button_Click:
MsgBox Err.Description
Resume Exit_Overall_Billing_Summary_Button_Clic

End Sub

.which does do any modifications to the form. And this particular form
does
not have any event modules on the form itself, only about a half dozen
button
routines to either open other forms (same with its subform). After the
poking around, I opened it again, the exact same way, and the date/time
did
not change (a couple times). But I got another form, nearly as simplistic
to
change. Code on the Main Menu was identical except for the form name and
the
Open event is:

Private Sub Form_Open(Cancel As Integer)
[BaseDate] = NormalizeDate(DateAdd("m", -1, Now()))
Me.Filter = "[rdate] = #" & [BaseDate] & "#"
Me.FilterOn = True
End Sub

I've done this same sort of stuff in the other database and the form
Modified date/time never changes. So this alarms me.


Jerry Whittle said:
If the form settings are being changed, that will change the modification
date.

See if there is some code that Set Warnings to Off. That will stop the
irritating message boxes about saving the form changes. There might even
be
some code that dynamically saves the form after changing the settings.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

:


I am using Access2003 and have two databases, the problem one is newly
created in Access2003, the other was created in a previous version, I
think
2000, but I believe was updated to 2003 before we purchased it. I make
modifications to both.

In both databases, I have created buttons that open forms and
occasionally
change settings on that form (like a background color or control
enable/lock
parameter). In the newer DB I have noticed that Modified date for
several of
the forms changes when the form is opened, and there's no pop-up
mentioning
changed or saving of changes. This doesn't happen for any forms in the
older
database.

It is something I should be concerned about (corruption?) or something
that
may be different due to version changes or some other Access setting?
It's
bothersome for me since I can't keep track of which forms were changed
intentionally as part of a programming change and which were simply
opened by
someone recently.
 

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