473,788 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2003 - How best to push front end updates?

Khriskin
20 New Member
As a warning, I'm self-taught so I have a bad habit of brute-forcing things out of ignorance. I've done some searching online and haven't found a solution, so I figured it couldn't hurt to ask you kind folks if there was a better alternative.

PROBLEM
I have multiple front ends that are updated on an almost daily basis as needs change (or I find problems). I need an easy way to push out new local copies of the front ends to multiple computers. Asking the users to replace the database themselves is highly problematic as there are very few computer savvy people on the production floor.

MY IDEA
I was going to create a PushTo access database (2003) that would store a list of the front ends, and a list of the locations/directories where the programs are stored. The program would then cycle through the locations for the program selected by the user, deleting the old version and copying the newer one over from the master folder. Thus I could trigger an update whenever I had a new version ready to go.

The alternate thought was to put code inside the front ends that would check on startup to see if it was current or not. But I'm not sure if there is a way to trigger a self-delete/replacement while the program is active.

QUESTION
Is there any easier way to do this? Am I going about this completely backwards?

Thanks!
Feb 11 '08 #1
10 11438
Minion
108 Recognized Expert New Member
It sounds like you have a couple good ideas there, but let me ask a couple things.

1. Are all the FE's identical?

2. Do all the users have access to a networked location that you control?

The reason I ask is this... If the number of users is limited they should be able to share a front end. Baring this it is generally easier to alter a stored location that you control than trying to access a user's machine. If all the users were hooked to one location you could store the front ends on the server and they would link via shortcuts on their desktops. Then you would need only replace the FE's on the server and the user would be blissfully unaware.

There are several ways to do what you are asking, but it'll take some further understanding to find the best method so bear with me.

Hope this helps.

- Minion -
Feb 11 '08 #2
Khriskin
20 New Member
1. Are all the FE's identical?

2. Do all the users have access to a networked location that you control?
This is where it gets a little complicated, and the point where I wish I had a whiteboard to doodle on. ^_^;; *sheepish look* (baa!)

1. The back ends are all stored in one folder that is accessible to everyone. (\\Fileserver\D atabases)

2. The front ends (master copies) are in another folder that is also accessible to everyone, but which is read-only to everyone but me. (\\Fileserver\D atabases\Active Copies of UI) This stops folks from using the master copy, as I need to get in an work on them on a more or less regular basis. *sighs* This also lets them replace the local copy if it gets corrupted (something I'm still teaching the Supervisors how to do. I really need to automate it at some point...)

3. There are 10 back ends and 22 front ends, not counting the front ends that haven't hit beta yet. Each of these front ends does something unique, from running custom reports for the various departments and supervisors, to recording a different data set at each manufacturing station. Such fun. However there are several of these databases that run on more than one computer (such as the Supervisor's Production Database) and those are the ones I need to force updates on.

3a. There are fifty some-odd users, thirty some-odd computers. The computers are not always turned on (sigh) and thus I probably need to code in something that remembers what it has updated and what it hasn't. Hrmm.. *makes notes*

4. Why local copies instead of shortcuts? They kept corrupting when multiple people used the same front end. Plus the UIs need to be running 24/5 (for production) but only need to link to the back ends when actively in use (5% of the time). Since the bulk of the users are never active at the same time, it's easer to break down the back ends accessing to each user. Thus everyone has a local copy that can pick up and drop connections to the back ends as needed. (Only active tables are linked, static ones have local copies that are programmaticall y sync'd)

5. Users are sneaky and keep ferreting away copies of the UIs to locations I don't know about. (I run a Search on the network every so often to try and kill them off.) So I probably need to include a validation code in the UIs themselves, just to keep folks from using the old versions.

Too much info? Not enough?
Feb 11 '08 #3
jaxjagfan
254 Recognized Expert Contributor
Just a thought ...

I had a single application which users logged into. I did a lookup on the backend user table to see what group the user belonged to. The forms and menus were all driven by the user group. Some forms and capabilitlies were shared across groups and a group I called "reporters" were only able to view and run reports.

I had case statements which may open a form read-only for one group and full access for another. The case statements would enable/disable functions as well.
Feb 11 '08 #4
Khriskin
20 New Member
I had case statements which may open a form read-only for one group and full access for another. The case statements would enable/disable functions as well.
This is something I have implemented for several of the databases, it filters by user and access level as to what they see and what they can edit. The problem with combining them into one 'Evil Overlord' database would be it would be a pain in the neck to document clearly enough that if I got hit by a bus the company wouldn't suffer.

I've got an Inventory Database, a Production/WIP Database, a Sales/Forecasting database, a Scheduling Database, etc. All of them talk to each other, but each of them has a host of unrelated tables, forms, and queries. There is a three-ring binder for each, with full documentation. Plus it's much easier to troubleshoot fifty-odd pages of code than it is 500. ^_~ *grin*
Feb 11 '08 #5
PianoMan64
374 Recognized Expert Contributor
The best way that I've dealt with that very issue is to create a batch file that they use to run the install/Update batch file. This way they can get the most current published version of the application that you place in a folder that is used for published versions of the different applications.

Expand|Select|Wrap|Line Numbers
  1. Call "R:\CorpAdmin\Records And Imaging\CSI\Tally Sheets\New User Interface\Install4.BAT"
  2. "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "c:\BatchTally\BatchTallyV4.mde"/wrkgrp "r:\CorpAdmin\Records and Imaging\CSI\Tally Sheets\New user Interface\StandardADPA.MDW"
  3.  
and the Install4.bat has the following in it.

Expand|Select|Wrap|Line Numbers
  1. c:
  2. cd\
  3. mkDir BatchTally
  4. CD\BatchTally
  5. Copy "r:\CorpAdmin\Records and Imaging\CSI\Tally Sheets\New user Interface\BatchTallyV4.MDE"
  6. Copy "r:\CorpAdmin\Records and Imaging\CSI\Tally Sheets\New user Interface\*.bat" "c:\BatchTally"
  7. Copy "r:\CorpAdmin\Records and Imaging\CSI\Tally Sheets\New user Interface\*.Lnk" "c:\Documents and Settings\%UserName%\Desktop"
  8.  
Hope that helps,

Joe P.
Feb 12 '08 #6
NeoPa
32,579 Recognized Expert Moderator MVP
I remember another Expert telling me of his solution for this, so I PMed him a link. Let's see if he can throw in something interesting ;)
Feb 17 '08 #7
Denburt
1,356 Recognized Expert Top Contributor
I know I am late on my posts a lot lately.

First I don't push them out since I don't have the necessary IT privileges etc.So what I do is this.

I created a routine which could definitely use some work and it is a little brutal or crude in some aspects but it serves it's purpose and it could/should help. Works great for us on quite a number of databases. A lot of this design is similar to some of your ideas and I completely understand the self taught approach so please feel free to ask as many questions you would like. I don't want it to just "work" I would rather you understand the code why it is there and what it is doing.

I start out with two tables one on the back end I call it "version", you update this one after designs are completed. The local one on front end I called it "versionFrm " to be compared with the one on the back end. Once they confirm they want the newer version I create a VBScript on the fly run it and the code immediately exits out of the db I am in, almost completely stupid proof. The VBScript copies the database creates a desktop shortcut etc.

Main form has a field with the current version number on it pulled from the local table Main form uses the on timer event to compare the tables periodically. I generally set the timer interval to 5min, set it longer if you don't change that database as often. For safety reasons I rename the older file each time and delete ones not needed, that way they will almost always have 2-3 backup front ends on the hard drive I am currently in need of automating the rollback so they don't need to call me for instructions on a manual rollback to the previous versions on the hard drive.

Does this sound like something you could use? If so I will post the code it is a fair amount so I will do a little house cleaning in case you would like it. I will be back in a day or two (tops I hope lol).

Oh btw I just had to add a check to see if the front end is on the network drive when the Main form is opened and if so I prompt them to copy it over this saves me so much time and headache. The supervisors can show the newbs hey look just click and go.
Feb 28 '08 #8
NeoPa
32,579 Recognized Expert Moderator MVP
Thanks for posting this Denburt. As it's such an interesting concept anyway, can you go ahead and post what you have. That way it's here for posterity :)
Feb 28 '08 #9
Denburt
1,356 Recognized Expert Top Contributor
I should probably post this in the articles section yet I would like to refine it a bit before I do that. I think I have everything or at least most of it if there is any questions or comments please feel free to let me know.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2.     If CheckVersion(Me!Version) = False Then
  3.         msg = MsgBox("This is an old version there is a newer version available. " & vbCrLf & "Click yes to copy a newer version to your harddrive (the old version will be renamed Futures1.mde and saved for a backup)!" & vbCrLf & "Click no to continue using this version!", vbYesNo)
  4.         If msg = vbYes Then
  5.             UpdateDB
  6.         End If
  7.     End If
  8. End If
  9. End Sub
  10. Public Function CheckVersion(Ver As String)
  11. Dim dbs As Database
  12. Dim rs As Recordset
  13.    On Error GoTo CheckVersion_Error
  14. Set dbs = CurrentDb
  15. Set rs = dbs.OpenRecordset("Version")
  16. Do While Not rs.EOF
  17.     If Ver = rs!VersionNo Then
  18.         CheckVersion = True
  19.     Else
  20.         CheckVersion = False
  21.     End If
  22. rs.MoveNext
  23. Loop
  24. rs.Close
  25. Set rs = Nothing
  26. Set dbs = Nothing
  27.    On Error GoTo 0
  28.    Exit Function
  29. CheckVersion_Error:
  30.     ErrEmail "modUtilities", Err.Description, Err.Number, "CheckVersion"
  31. End Function
  32.  
The UpdateDB function is a bit crude and I did have some trouble getting it to work since it is essentially creating a VBScript file similar to the batch file an earlier poster mentioned. I create this using code so I have even less issues to worry about. Once created you call it, then quit the Access app. Similar to what I think you were describing when you said you could call a function from another DB. Something I have thought about as well but for now this is how I am handling it and it works quite well.

Expand|Select|Wrap|Line Numbers
  1. Function UpdateDB()
  2. Dim strVBS As String, strFName As String, strPath As String
  3. strFName = "\copyMDB.vbs"
  4. strPath = Application.CurrentProject.Path
  5.  
  6. 'The VBScript code is simply pasted in below this comment but I removed it and placed the file in a more legible context below. This  could probably be stored in a table or something but as you stated I have been thinking about moving it to another central code DB 
  7.  
  8. strVBS = "Option Explicit" & vbcrlf &  "etc. etc. see the code below"
  9.  
  10. 'For the finale
  11. SaveTextData strPath & "\" & strFName, strVBS, "ASCII"
  12. 'Function to create a shortcut
  13. CreateShrtCut
  14. DoEvents
  15. 'Function to call VBScript
  16. RunIt strPath, strFName
  17. DoEvents
  18. DBEngine.Idle
  19. Application.Quit
  20. End Function
  21.  
  22. Function SaveTextData(FileName, Text, CharSet)
  23.   Const adTypeText = 2
  24.   Const adSaveCreateOverWrite = 2
  25.  
  26.   'Create Stream object
  27.   Dim BinaryStream
  28.   Set BinaryStream = CreateObject("ADODB.Stream")
  29.  
  30.   'Specify stream type - we want To save text/string data.
  31.   BinaryStream.Type = adTypeText
  32.  
  33.   'Specify charset For the source text (unicode) data.
  34.   If Len(CharSet) > 0 Then
  35.     BinaryStream.CharSet = CharSet
  36.   End If
  37.  
  38.   'Open the stream And write binary data To the object
  39.   BinaryStream.Open
  40.   BinaryStream.WriteText Text
  41.  
  42.   'Save binary data To disk
  43.   BinaryStream.SaveToFile FileName, adSaveCreateOverWrite
  44.   Set BinaryStream = Nothing
  45. End Function
  46. Public Sub CreateShrtCut()
  47. On Error Resume Next
  48.     Dim wsShell As New WshShell
  49.     Dim wsSCut As WshShortcut
  50.     Dim strCommandLine As String 'Command Line for shortcut to run
  51.     Dim DskTop
  52.     Dim strYN  As String
  53.  strYN = MsgBox("Would you like a shortcut for this database on your desktop?", vbInformation + vbYesNo)
  54. If strYN = 7 Then Exit Sub
  55.     DskTop = wsShell.SpecialFolders("Desktop")
  56.     Set wsSCut = wsShell.CreateShortcut(DskTop & "\ShortcutFutures.lnk")
  57.     strCommandLine = "C:\SomeFolder\Futures.mde" 
  58.  
  59.     With wsSCut
  60.         .TargetPath = strCommandLine
  61.         .Save
  62.     End With
  63.  
  64.     Set wsSCut = Nothing
  65.     Set wsShell = Nothing
  66. End Sub
  67.  
  68.  
VBScript code to be entered into the VBA code from above.


Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2. Dim strFile, sfol, dfol
  3. Dim Cnt
  4. Dim fName, ext, strErr, isOpen
  5. Dim ws, fso, myApp
  6. Set fso = CreateObject("Scripting.FileSystemObject")
  7. 'File Name
  8. fName = "futures"
  9. 'main folder location
  10. sfol = "network path"
  11. 'Destination folder
  12. dfol = "C:\someFolder\"
  13. ext = ".mde"
  14. Cnt = 3
  15. Set WS = CreateObject("Wscript.Shell")
  16. If not Folexists(dfol) then CreateFolder(dfol)
  17. Do Until Cnt = 0
  18.     If FExists(dfol & fName & Cnt & ext) And Cnt = 3 Then
  19.     DeleteIt dfol & fName & Cnt & ext
  20.     ElseIf FExists(dfol & fName & Cnt & ext) And Cnt = 2 Then
  21.     RenameIt dfol & fName & Cnt & ext, dfol & fName & (Cnt + 1) & ext
  22.     ElseIf FExists(dfol & fName & ext) And Cnt = 1 Then
  23.     If FExists(dfol & fName & Cnt & ext) Then
  24.         RenameIt dfol & fName & Cnt & ext, dfol & fName & (Cnt + 1) & ext
  25.     End If
  26. RenameIt dfol & fName & ext, dfol & fName & (Cnt) & ext
  27.     End If
  28.     Cnt = Cnt - 1
  29. Loop
  30. CopyIt sfol & fName & ext, dfol & fName & ext
  31. WS.PopUp "Thanks for updating to the latest version!"
  32. Ws.Run """C:\Program Files\Microsoft Office 2003\OFFICE11\Msaccess.exe """ & dfol & fName & ext,1 
  33. Set myApp = Nothing
  34. Set WS = Nothing
  35. Set fso = Nothing
  36. Function RenameIt(strFile, dfol)
  37. Dim cnt
  38. on error resume next
  39. strErr = fso.MoveFile(strFile, dfol)
  40. if err = 70 then
  41. do until err= 0 or cnt = 200000
  42. err.clear
  43. strErr = fso.MoveFile(strFile, dfol)
  44. cnt = cnt+1
  45. if cnt = 200000 then 
  46. ws.popup "There is an error that we are unable to account for at this time." & vbcrlf & vbcrlf & "Please close any open MS Access databases then go to C:\someFolder and open or click on the file named copyMDB.vbs" & vbcrlf & vbcrlf & "If you have any further problems questions or comments please contact your administrator."
  47. exit do
  48. end if
  49. Loop
  50. end if
  51. End Function
  52. Function DeleteIt(strFile)
  53. strErr = fso.DeleteFile(strFile)
  54. End Function
  55. Function CopyIt(strFile, dfol)
  56. Dim fso
  57. Set fso = CreateObject("Scripting.FileSystemObject")
  58. strErr = fso.CopyFile(strFile, dfol, True)
  59. Set fso = Nothing
  60. End Function
  61. Function FExists(strFNme)
  62. If Not fso.FileExists(strFNme) Then
  63.     FExists = False
  64. Else
  65.     FExists = True
  66. End If
  67. End Function
  68. Function FolExists(strFol)
  69. If fso.FolderExists(strFol) Then
  70.     FolExists = True
  71. Else
  72.     FolExists = False
  73. End If
  74. End Function
  75. Sub CreateFolder(strFol)
  76. Dim fso
  77. Set fso = CreateObject("Scripting.FileSystemObject")
  78. If Not fso.FolderExists(strFol) Then
  79.     strErr = fso.CreateFolder(strFol)
  80. End If
  81. Set fso = Nothing
  82. End Sub
Mar 3 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

13
7499
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the frontend) will stop firing until the user gives the form focus. (Note that the update itself always...
1
5167
by: Mike | last post by:
Hi Hi We are currently upgrading from access 97 to office 2003 on site. We would like to upgrade our access databases to Access 2003 but we wish to remove Microsoft access software from our end users so that we can control the creation of databases. Is there a way that our end users can still use these upgraded access databases without having access 2003 installed on their machines. The mdes will reside on a server so they can be...
6
3672
by: Terry Bell | last post by:
We've had a very large A97 app running fine for the last seven years. I've just converted to SQL Server backend, which is being tested, but meanwhile the JET based version, running under terminal server, has suddenly started running very slowly. The network engineer has thrown up his hands and said "It's Access 97". I've checked out lots of things including the Oplocks setting and other stuff from this NG, and I think I've done everything...
11
3569
by: DFS | last post by:
Architecture: Access 2003 client, Oracle 9i repository, no Access security in place, ODBC linked tables. 100 or so users, in 3 or 4 groups (Oracle roles actually): Admins, Updaters and ReadOnly. Each group sees a different set of menu options when they open the client and login to Oracle. For the sake of speed I use pass-through queries here and there for updates and deletes. I update their SQL property in code and execute them.
5
1964
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The...
15
4644
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
3
2788
by: RayPower | last post by:
I'm having a system using Access 2000 as both front-end (queries, forms, reports & temp tables for reports) & back-end (data) with back-end running on the server. The application runs on the network with around 15 users. The back-end database is suffering from performance issues. There were several corruptions since few months & one major corruption & corrupted the MSysObjects table. Also, the system will run batch process that generate...
9
2417
by: Moor | last post by:
I have a .MDB back-end database that is created with Access 2.0. And multiple front-end mdb's, some are created by Access 2.0, and the rest are created by Access 2003. The fron-ends had table attachments to the back-end database. The problem is I'm unable to access any table by both versions of Access in the same time! Here are the steps to replicate the problem 1- Open one Access 2.0 front-end mdb, then open the attached table T1
14
9451
by: Brian Nelson | last post by:
Sorry for the long post, I've tried so hard to solve this one but I'm just stuck! We've had a multiuser .mdb file on a network share for years. I know it's not ideal, but it's worked well from Access 2000 to 2003. Ever since we upgraded to 2007, we've noticed some serious bloating. When we were on 2003, after a fresh compact, the database would be at about 20 MB. After normal use it would grow to about 25 MB and then significantly...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.