CloseCurrentDatabase method and Date modified of the mdb accdb file

evertVB

Registered User.
Local time
Today, 00:54
Joined
Sep 21, 2010
Messages
21
I'm opening another access database using the following code:
Code:
[SIZE=2]Private Sub OpenTargetDB()[/SIZE]
[SIZE=2]Set accapp = New Access.Application[/SIZE]
[SIZE=2]accapp.OpenCurrentDatabase (TargetDBName)[/SIZE]
[SIZE=2]'accapp.Visible = True[/SIZE]
[SIZE=2]End Sub[/SIZE]
[SIZE=2][/SIZE] 
[SIZE=2]Private Sub CloseTargetDB()[/SIZE]
[SIZE=2]'accapp.Visible = False[/SIZE]
[SIZE=2]accapp.CloseCurrentDatabase[/SIZE]
[SIZE=2]Set accapp = Nothing[/SIZE]
[SIZE=2]End Sub[/SIZE]

I'm not changing or updating anything in the other database, but still the timestamp of the other database is modified ==> here I mean the Date modified of the mdb- or accdb-file in the filesystem.
How can I prevent this from happening?
 
I know of no way of preventing that. Access opens the files in read/write mode... and starts tinkering with the file right away.

That is exactly why I developed technology to deliver "disposable FE DB" technology.

FE AutoUpdate with RoboCopy / XCopy
http://www.access-programmers.co.uk/forums/showthread.php?p=1214733#post1214733

And to produce the new golden FE, I perform the following on the copy of the DB file intended to be deployed...

VBA to Cleanup A2007 DB Extra Objects
http://www.access-programmers.co.uk/forums/showthread.php?t=226466

NT Command Script and Documented Steps to Decompile / Compact / Compile an Access DB
http://www.access-programmers.co.uk...to_Decompile_/_Compact_/_Compile_an_Access_DB
 

Users who are viewing this thread

Back
Top Bottom