Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32
  1. #31
    Chronik is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    17
    Quote Originally Posted by help_me_with_access View Post
    well THAT is a little different!
    I got the code working, so don't waste your time on this tonight. I'll post it tomorrow when i'll get something else working.



    maybe you can answer this problem thought: Sometimes when i'm trying the code, if it crashes or if I stop it before the end, it wont close the Solid Edge file, therefore it will be stuck on read only and VB will not be able to re-open it. Is there a way to open the file in read only at first so that it doesn't matter if the program goes through the end or not. That will allow the program to read the file's properties when someone is working on it as well.. (I know i could create a copy but that will definately use a significant amount of time).

    Have a nice day!

  2. #32
    help_me_with_access is offline help_me_with_excel
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    262
    with proper error handling, that shouldn't be an issue. crash, as in you mean that the code fails, right? in your handler, you really should have this:

    Code:
    Call objPropSets.Close(FilePath)
    I see that you're doing that in the coding anyway through each file op. right? if that is closing it the code needs to be changed. but if that is indeed an equivalent op to visual basic's CLOSE statement during I/O ops, putting it in the error handler is all you need to do.

    but if your access app crashes all-together, no there's nothing you can do about it during that instance.

    by the way, i don't think opening the file in read-only (if you even had that option) is part of a solution. read-only is not part of the problem. at least not in traditional i/o ops in visual basic. it assigns integer values as indexes to files when they are opened in i/o. if you leave the file stream open without closing it I believe the file number still keeps association to that actual file until you close the app and destroy the memory usage completely.

    but traditional i/o statements like open (for access), opentextfile, etc... have modal arguments that you can specify the type of stream. stream - read-only, input, output, append, read, write, binary.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. using mdb files which are backed up hourly into zip files
    By Robbie MacKinnon in forum Access
    Replies: 3
    Last Post: 05-05-2015, 05:02 AM
  2. Building Relationship: one to many
    By Keeper in forum Access
    Replies: 1
    Last Post: 04-25-2012, 05:31 PM
  3. Building a FAQ
    By Karin in forum Access
    Replies: 5
    Last Post: 03-07-2011, 11:26 AM
  4. Replies: 1
    Last Post: 02-21-2011, 09:55 PM
  5. Building
    By jlech1805 in forum Access
    Replies: 1
    Last Post: 11-17-2010, 12:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums