Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 26th, 2005, 12:04 PM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mysterious FileSysObj Behavior

I've developed a medium-sized end-user app. in Access. Most of the code is very run-of-the-mill sort of stuff, but there is one slightly unusual thing against which I am running into some issues. My app provides the capability to load data into a database from a specially formatted plaintext file.

For that function I have a class that does some simple file-system manipulation. This class just has a few simple methods, including a check to see if a particular file is "valid" to load as data for this particular application, and load/save functions.

The application provides the end-user a custom file browser form (i.e., one created wholly by me, not the built-in Windows file open/save). There are a number of reasons I am not using the Windows file open/save dialog, the main one being I wanted absolute real-time control over which files the user can browse to. Only "valid" files show-up as available, to the end user, to load into the application. Also, my attempts originally to use the built-in Windows file open/save dialog were producing some unusual, erratic behavior in some cases.

The app is compiled and distributed as an MDE, and generally works beautifully on Office versions 2000/XP/2003. With some users, however, the plaintext data files are never "found," and simply do not show up as available in my custom file browser. The system behaves normally in every other way, including the ability to use my custom browser to see any drive or folder on the PC. (My custom browser is a facsimile of the built-in open/save dialog which allows the user to browse to any location on their PC).

I've not been able to re-produce the behavior on any of my test-bed PCs, with any version of office or Windows. In fact, I am able to browse to and load files which have proven problematic for other end users.

I can only assume this has to do with some sort of file permission or file properties issue, or some sort of esoteric behavior related to scripting objects generally. Not being a Windows admin. type, though, I cannot isolate exactly what those issues could be. I am in no way educated on the intricacies of scripting objects--I only know how to use them. I can't imagine there is something wrong with my code, though, because it behaves perfectly on some but not other PCs. It is an environment-specific problem. My code is actually quite simple, and engages with the file system in only the most cursory fashion (i.e., getdrive, getfolder, getfile, opentextstream).

Has anyone out there seen any similar or even somewhat relevant behavior? This is a really sticky problem and throwing a huge monkey wrench into an otherwise completely successful project.

Thanks!
 
Old April 26th, 2005, 04:55 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

It does sound like a file access problem.

See whether the user having the problem can navigate to, and open the file that is giving trouble. (I usually right-click a suspect file, and select Send To|Notepad from the context menu. Notepad will open a file that is already opened by another (eliminating a possible source of falsely finding that you do not have permissions to the file), and doesn’t usually get flumoxed by unexpected formats and such.





Similar Threads
Thread Thread Starter Forum Replies Last Post
erratic cursor behavior Tim Johnson Access 4 November 27th, 2007 07:30 AM
Mysterious Coding bLo C++ Programming 3 January 4th, 2007 01:22 AM
mysterious problem (data no inserting ) gratisaccount VB.NET 2002/2003 Basics 1 June 29th, 2006 08:48 AM
mysterious error runtime error '451' coyotworks Excel VBA 1 May 12th, 2006 03:57 PM
Mysterious Hidden OrderByOn tlwaltz BOOK: Expert One-on-One Access Application Development 0 October 11th, 2004 06:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.