[AccessD] Where is the Zip Drive?

Chris Enright cclenright at yahoo.com
Sun Sep 3 05:44:27 CDT 2006


I wish!!
  
  I seem to remember the definition of expert:
  
  x is an unknown quantity
  spurt is a drip under pressure
  
  or
  
  An expert is someone who knows more and more about less and less until in the end he knows everything about nothing!

Jim Lawrence <accessd at shaw.ca> wrote:  Chris: If it works, you're an expert.

Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Chris Enright
Sent: Saturday, September 02, 2006 11:05 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Where is the Zip Drive?

The little I know about VBA I got from this site. Every day I read every
email! Eighty percent goes right over my head! But the little I have
understood from AccessD makes me a living. J
   
  I have a program that the customer loves. He keeps opening new branches
and, because he is slightly computer literate (and therefore dangerous), he
happily installs FE and, a BE with blank tables, on each new PC.
   
  Unfortunately, the people who supply the PCs to him configure them
differently each time they supply one.
   
  My program is designed so that, at close down, it will backup the BE to an
Iola Zip Disk. This is normally E:. (Based on A: Floppy, B: (showing your
age), C: Hard Disk, D: CD/DVD.)
   
  However, sometimes there seem to be all sorts of odd drives, even phantom
disk partitions and the Zip Drive isn't where I programmed it.
   
  The customer LOVES going in to my FE and sorting it out! Inevitably I then
spend hours (because he didn't tell me what he had done) tracking down a
problem on a new installation.
   
  Below is my, very crude, (please don't laugh, it normally works), backup
function. Could someone please correct it, either to the list or offline, so
that it will detect where the Zip Disk is?
   
  TIA
   
  Chris
   
  {Oh I am embarrassed about showing my code to you lot}
   
 
----------------------------------------------------------------------------
------
   
  Private Function Backup()
   
      Dim strNewDBName As String
      Dim strOldDbName As String
      Dim fso
      Dim file As String
      Dim msg As String
      
  On Error GoTo Err_Backup
                  
      DoCmd.Hourglass True
      
          ' copy database
          strOldDbName = "C:\Startan\Startan BE.mdb"
          strNewDBName = "D:\BuExp.mdb"
          FileCopy strOldDbName, strNewDBName
                              
          ' if a previous backup exists then delete it
          file = "D:\StartanBU.mdb"
          Set fso = CreateObject("Scripting.FileSystemObject")
          If fso.FileExists(file) Then
              fso.DeleteFile file, True
          End If
               
          ' rename backup database
          Name strNewDBName As file
          
      DoCmd.Hourglass False
          
  Exit_Backup:
      Exit Function
   
  Err_Backup:
      msg = "Make sure the Zip Disk is in the computer " '& Chr(10)
      msg = msg & "and that the drive lights have stopped flashing "
      msg = msg & "and then press Enter"
      MsgBox msg
      Resume
      
  End Function
     

  
   
  Still blushing, going for a drink!!
   
   
  Chris
   

   
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


 				
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.


More information about the AccessD mailing list