I am looking to find some code that I can use in a batch file to compact an Access 2000 database that has a database password set on it.
I know about "C:WIPSPOCOneCall_BE.mdb" /compact but need to find a way to pass it the password. What it does at the moment is open and waits for the password to be entered, and then it just opens.
I am looking to set up a scheduled task so that the database gets compacted every night.
Any way to deploy the mde with a batch file? I been looking for way other than the autofeupdater. Can't get it to work since I prefere not to involve the users. I been getting bits and pieces; but it seems like you send a bat file to the users via email and when they run the script; it appends itself to the doc and settings in the users folder??
Is there a way to open an Access Database from a batch file or VBS file wait for 20 seconds and then close the Access file. Preferably I would like the Access file to run in either invisible or minimized mode. I would like the Access Database to close again after the 20 seconds has elapsed.
(The reason for this is so that the Database can refresh itself from Sharepoint on another users machine so that the excel reports on his machine are up to date).
I have been trying to set up a batch file to allow users to copy the latest version of the front end whenever a change is made. The following is the code that I am trying to get to work properly. The first part works fine, the old front end is copied to a folder on the user's desktop as a backup. But I cannot get the copy of the server - the "P" drive, to overwrite the current copy on the user's desktop. Actually I cannot get the code to copy the new front end from the server and install it on the user's desktop. I think the path is correct for I seem to be able to run the new front end from the server.
When I look for the location on my computer, the server locations is listed as:
General (Servernamefiles) (P: ) (there is no space after the P: it seems to result in a smiley face when I type it and try to post it).
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b set TODAY=%year%-%month%-%day% rem echo %TODAY%
[Code] .....
This code works so I thought that the path was correct rem this works rem start the new DB front end Start P:AccessMainSplitBENewFrontEndDBMain.accdb
But this code does not. echo f | xcopy /f/y/ P:AccessMainSplitBENewFrontEndDBMain.accdb c:UsersUserNameDesktopDBMain.accdb
Neither does this: echo f | xcopy /f/y/ ServerNamefilesP:AccessMainSplitBENewFrontEn dDBMain.accdb c:UsersUserNameDesktopDBMain.accdb
I currently manually run a compact and repair on the backend of a database at work, but was wondering if it might be sensible to set it to compact on close so that (in theory) it is done at least daily and therefore shouldn't take much time?
The back end resides on a network server, which is backed up continuously, so in theory it should be easy enough to roll back to a backup copy should anything untoward happen.
Access 2013 ... Is it possible to compact a database to a new name?
(In previous incarnations of Access I regularly 'compacted and repaired' databases to USB sticks rather than simply copy the file in the (mistaken??) belief that this was a more reliable approach)...
In my access applications i have used the database split built in functionallity to split my frontend and backend tables.I have created a mail mechanism and when the database grows to that level i recieve a mail, ask users to get out of the database and compact the database. But this is tiding. I have a scheduled job that compacts databases early in the morning before users logged on. But during day work databases grow enormous again. Well is there a way by VBA code to create an auto compact function that on idle will log off all users in the database and compact it?
I have a multi-user db. There are actually 3 computers all on a windows network that access the db, which is located on my hard drive. The computers are in different offices. I've asked the users to please close the db when they are leaving for the day - so that it does not remain open - and lock me out of design mode. But they sometimes forget and leave the db open. When I come in in the morning (I'm the first one here) I sometimes have to walk to their offices and close the db manually. Is there any way to close the app from my computer - so that all instances of the db are closed? Perhaps even a button somewhere with vba code that would do it?
How would I use the Access 2010 setting, 'Compact on close'?We have a back end on a server and many users with front ends on their computers. So would I set 'Compact on close' on the back end? And then it would compact when the last user logged out?
Can anyone help me please I have a client database which is linked to website is there is anyway that the database can be linked remotely.
eg if one of the company staff is on the road and want to access the database to view and see what kind of info has been stored in there. So that they can access the database remotely once its on the server. How do you make it possible for this to happen or is there some VB programming need to be done to make this possible
In month-end posting - I basically delete all the records from my transaction file. And in doing so - it seems to be resetting the auto number index - which is causing me major problems.
The resetting of the index after deleting all the records is normal.
I am working in VB 2010 - using a 2003 MS Access database.
I have a form in which job times for individuals is entered. As the data is entered, a macro fires to calculate various costs (Nat Ins/Pension/Total cost etc etc), and that data is stored in a table.
I now have written code to enable the inputting of the data into the database directly from the Excel sheet in which the data is first entered - this is great as it cuts out a data entry repeat and will be a big big time saver.
I use a batch file to distribute the front end of a database application. Currently, everytime the user clicks the shortcut on her desktop, the batch file executes and copies the front end from a network location to user's local machine. The FE is updated like every couple of days. The users run the database more frequently.
I would like to modify the batch file so that it checks some attribute of the FE file to decide whether it needs to be updated. I can't rely on file size, since the FE includes temporary tables. I essentially need something like the "tag" property of form controls, only for files. It would be ideal if it was me who sets this property, like "version number". Except it has read without opening the file itself.
I am trying to create a nightly batch run process that grabs contents from a fixed length text file. These files arrive daily and will be kept on a network drive. Can i schedule a specific time for access to run a load script?
Could someone please tell me if this is an appropriate way to ensure that all of my users open the most current version of my database each time?
I am not using workgroup security(not needed), and have the be and fe on the network drive. Right now everyone has their own copy of the fe so everytime I make a change they get a new copy emailed to them. I would like to use a batch file instead. This works but want to make sure that I am doing it correctly if I just send everyone this batch file to put on their desktop (CostSavings.bat)
@echo off
if not exist "C:Program FilesMicrosoft OfficeOFFICEMSACCESS.EXE" goto Access11
"C:Program FilesMicrosoft OfficeOFFICEMSACCESS.EXE" "V:ProjectMaterialsPurchSQECost SavingsCostSavings2005.mdb" goto end
:Access11 "C:Program FilesMicrosoft OfficeOFFICE11MSACCESS.EXE" "V:ProjectMaterialsPurchSQECost SavingsCostSavings2005.mdb" goto end
I am trying to automatically update a front end with a batch file. I have searched and found a great solution :D but I am having one issue :confused: .
The batch file runs great . . . goes to the network drive; compares the version;deletes the old front end on my system and replaces it; opens access with the new version.
The issue is that is keeps the old version open. I see on some posts that some of you did this successfully but nobody went into that detail. I have tried multiple things but still can't get it. :D
I want to use a batch file to start the DB. This will check if the Front End is on the users machine and if not copy it over.
It will then check what version of Access they are running and use the appropriate shortcut to open the Database.
This all works fine except that the Batch File does not close down until the Database is closed. Is there anyway to close the Batch File automatically while the database is running?
The Batch file I am using is
@echo off rem ************************************* rem ** Batch file to copy FE ** rem *************************************
rem ** Copy Database **
if not exist "c:DB" md "c:DB" if not exist "c:DBFE.mdb" copy "NetworkPathFE.mdb" "c:DBFE.mdb" if exist "C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXE" goto Office10 if exist "C:Program FilesMicrosoft OfficeOffice11MSACCESS.EXE" goto Office11 if exist "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" goto Office
:Office10 "C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw" goto End
:Office11 "C:Program FilesMicrosoft OfficeOffice11MSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw" goto End
:Office "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw" goto End
I'm trying to import a file that's being updated with information from an RS232 data logger. While there is no information updating the file, it's safe to import the file and then empty it which can be done from DOS copy commands, essentially I do the following:
Make a snapshot of the existing data into an upload.txt file, import it into Access, overwrite the logging.txt file with a blank copy, overwrite the snapshot with a blank copy.
The reason I'm doing this in DOS is that the import routine fails within Access saying that the logging.txt file is already in use and can't be accessed (I'm assuming that Access wants to take full control of the file, or opens it in a particular way hence the batch file approach)
The problem I'm experiencing is that Macros allow you to run batch files, but the macro continues to run immediately after the batch file is triggered to run, so in this particular case, the information in the logging.txt file isn't copied quick enough to the upload.txt file before Access tries to import it, meaning that Access imports no information (empty file) and then the macro of course runs the second batch file which then empties both the logging.txt file and the upload.txt file.
Two options at the moment if suggestions are willing and available:
1) Somehow stop Access trying to take full control of the text file and allow it to import the information and then overwrite the file with a blank copy.
2) Make Access wait until the batch file has finished before proceeding with the macro.
A couple of thoughts cross my mind for option 2, a timed loop to wait for the batch file, although no guarantees on timing on that one and also perhaps having the batch file create a tag.txt file after the copy is complete which Access looks for before continuing the Macro (maybe have to go into VBA coding for that) then delete the tag file after import routine has finished (the tag file of course will not be in use, so deletion from within Access would be possible)
It's always better to bounce these ideas round the board before heading down one particular road.
i want to create a batch file that basically backs up the database file i want into a folder as follows
x:ackupsdatabase020206db.mdb
i know that the command to create the folder is mkdir but i want to know how to integrate the data into the folder name so that this batch file can be run in windows scheduler and i dont have to worry about it overwriting the existing folder name.