troubleshooting Question

vba code to check folder size doesn't work on Win 7 PC's

Avatar of Clay Willing
Clay WillingFlag for United Arab Emirates asked on
* WebSockets* monitorVBAWindows 7Microsoft Access
8 Comments1 Solution217 ViewsLast Modified:
I have an access based file monitor app that basically scans folder sizes to see if they have increased after x seconds (set by form timer property).  Each folder being scanned is being filled with data sniffed from winsockets and creating text files of data received and due to my winsocket program, i can see the data arriving so the data is indeed being stored.  
The code uses the filesystemobject - folder.size property to test for change and works perfectly well on Win XP PC's running Office 2010.  However when i copy the same accdb onto a win 7 machine, the code runs without error but does not detect and therefore update the underlying table.
I also re-wrote the code to iterate through sub folders to get the accumulated and therefore ultimate parent folder size and I get the same effect.  It just refuses to detect any change in the folder size.
Bizarrely, with the code running and showing my form, (a text box shows green if the folder size displayed in the box increases and reverts to red if the size remains the same) and I open a subfolder that I am testing with windows explorer, which shows the latest stored file, i can see the file size in details view change from zero to the proper size and my program responds appropriately.  If I do nothing, again the size reverts to the same as listed previously.  Once again, if I hit F5, the size in Win Ex changes and the program instantly responds.
I initially suspected some form of Windows 7 vaguery, so I borrowed a PC with a completely vanilla install of win 7 and got the same effect.
I have also checked Access references to ensure the scripting objects etc are all the same. Has anyone else come across a similar effect when using the fso?
I will post the detection code when I get back to my other PC.

Kind regards, a rather stumped vba access programmer
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros