Re: Access snapshots with VBScript

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: MacDermott (macdermott_at_NoSpam.com)
Date: 09/22/04


Date: Wed, 22 Sep 2004 07:32:08 -0400

You might try using
    oAccess.Quit
instead of
    oAccess.Close

Do all your PCs have the same version of Access? Same patch level?

    - Turtle

"Primoz Bradac" <primoz.bradac@bfro.uni-lj.si> wrote in message
news:MPG.1bbb68f34f5bbfed989685@msnews.microsoft.com...
> I apologize for this article not being quite in line with the name of
> the group but I think it is the closest...
>
> I make a snapshor (of a report) with a (VBScript) script which runs as
> follows:
> ------
> Const acOutputReport = 3
> Const acOutputFormat = "Snapshot Format"
> Const db = "C:\_Temp\Auto\MyDB.mdb"
> Const snap = "C:\inetpub\wwwroot\test\rptKatalog.snp"
> Dim oAccess
>
> Set oAccess = GetObject(db,"Access.Application")
> oAccess.DoCmd.OutputTo acOutputReport, "rptKatalog", acOutputFormat,
> snap
>
> oAccess.Close
> set oAccess = Nothing
> ------
> The script runs OK but one problem I have is that after running it the
> data base seems to stay locked (there is MyDB.ldb in the directury and I
> cant open MyDB.mdb by doubleclicking it any more)
> What statement did I forget in my script?
>
> The second question is:
>
> If I set acOutputFormat to "Snapshot Format (*.snp)" in above script
> which is what I get if I do ?acFormatSNP in the Immediate Window of the
> VBE in Access, in at least one computer this "format" is not recognized
> and I have to change it to the above value ("Snapshot Format").
>
> I'd really appreciate any explanation.
> TIA,
> Primoz



Relevant Pages

  • Re: [OT] Claude S. Sutton (was: Re: Hiding Recipients Addresses)
    ... To the users of this list, I would like to apologize for losing my temper. ... only the reader of a message shown as the recipient was enough. ... packages and scripts available for other packages that do exactly what I ... In W2K, with either POCO or Barca2, one could write a script which will go ...
    (comp.mail.mutt)
  • Re: Renaming files by counting the number of files
    ... > in partially unfinished state - items that should be config file ... the script is putting too much or too little ... And of course documentation and comments ... was wanting someone to write a script for me....I apologize for ...
    (comp.unix.sco.misc)
  • Using ISpell
    ... I'm a newbie when it comes to using modules, so I apologize if this ... I'm working on a Windows 2000 machine. ... spellcheck some html files. ... When I run the script, I get an error: ...
    (comp.lang.perl.moderated)
  • Re: rename computer
    ... I apologize, I need to be able to do it via some kind of script such as ... vbscript or command line. ...
    (microsoft.public.win2000.general)