Solved

Update Databawe

Posted on 2010-08-28
7
327 Views
Last Modified: 2013-11-27
I have a database that I've split into a FE&BE.  The client(FE) is on the client's C: drive.  The BE is on the Shared Drive.

Currently when I make changes to the database I have to let each client know to go to the shared drive and copy the changed database to their C: drive.

Is there code i can use that would do this systematically?
0
Comment
Question by:mato01
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33549548
0
 

Author Comment

by:mato01
ID: 33549558
I was looking for another solution because I cannot download programs/software to my work laptop.
0
 
LVL 39

Expert Comment

by:als315
ID: 33549559
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:mato01
ID: 33549609
I've attached the code from

http://www.access.qbuilt.com/html/update_front_end.html

See code below:  Do I have to create an executable "MSAccess.exe" file for the database I'm trying to download.

 'Determine path of current Access executable.
  strAccessExePath = SysCmd(acSysCmdAccessDir) & "MSAccess.exe "
Option Compare Database
Option Explicit
 
Declare Function apiCopyFile Lib "KERNEL32" Alias "CopyFileA" _
                   (ByVal lpExistingFileName As String, _
                   ByVal lpNewFileName As String, _
                   ByVal bFailIfExists As Long) As Long

Public Function UpdateFEVersion()
  On Error GoTo ProcError
 
  Dim strSourceFile As String
  Dim strDestFile As String
  Dim strAccessExePath As String
  Dim lngResult As Long
 
  'Create the source's path and file name.
  strSourceFile = "\\server\share\YourFEDatabase.mde"
  strDestFile = CurrentProject.FullName
     
  'Determine path of current Access executable.
  strAccessExePath = SysCmd(acSysCmdAccessDir) & "MSAccess.exe "

  If Dir(strSourceFile) = "" Then 'Something is wrong and 
                                             ' the file is not there.
     MsgBox "The file:" & vbCrLf & Chr(34) & strSourceFile & _
       Chr(34) & vbCrLf & vbCrLf & _
       "is not a valid file name. Please see your Administrator.", _
       vbCritical, "Error Updating To New Version..."
       GoTo ExitProc
  Else 'copy the new version of app over the existing one.
     lngResult = apiCopyFile(strSourceFile, strDestFile, False)
  End If
                   
  'Modify strDestFile slightly so that it can be used
  ' with the Shell function.
  strDestFile = """" & strDestFile & """"

  MsgBox "Application Updated. Please wait while the application" & _
     " restarts.", vbInformation, "Update Successful"

  'Load new version, then close old one.
  Shell strAccessExePath & strDestFile & "", vbMaximizedFocus

  DoCmd.Quit

ExitProc:
Exit Function
ProcError:
  MsgBox "Error " & Err.Number & ": " & Err.Description, , _
     "Error in UpdateFEVersion event procedure..."
  Resume ExitProc
End Function

Open in new window

0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 33550522
There are at least a dozen ways to do this.
You can do a Google search for:
   Microsoft Access Database Front End update automatic
http://www.google.com/#hl=en&source=hp&q=+++Microsoft+Access+Database+Front+End+update+automatic&btnG=Google+Search&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=7db4f7af4a13aa89

To see hundreds of links
;-)


The link:
http://www.autofeupdater.com/
...is not a "Program" per se.
It is just a file you put on your machine.
(see the description in the link)

<I cannot download programs/software to my work laptop.>
Even if it fixes an crucial problem, and works flawlessly?
Can you explain to your supervisors that may be needed?
Just for testing, if it is not applicable it can be deleted.
This is by far one of the most popular utilities for doing this.
It is robust and you have support for it.

If you use a "Code Only" solution that you get from a link or even an expert here, and it has issues: (Version incompatibilities, No Roll Backs, No error handling, No backup, No tech support, causes unforeseen issues in your database, ....or needs extensive mods to work in your environment, ...
...who ya gonna call? ... if *Your* database has issues because of it??
;-)


But again do the Google search and see if you feel comfortable with any of the other techniques

;-)

JeffCoachman

0
 
LVL 39

Expert Comment

by:als315
ID: 33551965
See code below:  Do I have to create an executable "MSAccess.exe" file for the database I'm trying to download.

It is Microsoft Access, which is executed your DB. It can be placed in different places and program need know, where it is.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33667511
ok
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now