Solved

Update Databawe

Posted on 2010-08-28
7
326 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 119

Expert Comment

by:Rey Obrero
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Question has a verified solution.

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

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

947 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

21 Experts available now in Live!

Get 1:1 Help Now