Modules & VBA :: Creating A Batch File To Open Up Another Database

Mar 11, 2015

I want to create a batch file that will be used in a RunApp macro command to open up another database.

View Replies


ADVERTISEMENT

Modules & VBA :: Creating EXE Or BATCH File That Executes Specific Excel Macro?

Jan 27, 2015

Is there a way to create some sort of an EXE or BATCH file in any Windows Explorer folder, that executes me a specific Excel Macro?

My problem is that I got several files split up by Departments, updated every day.

So far I have to open each file and update the format.

It would make my life much more easier if I could just run a file that opens each file and applies a format to them.

View 1 Replies View Related

Creating Batch File Running Access Query?

Dec 20, 2012

I am creating a batch in an Access Query to decompress files that come in from an FTP site. When I right click on the query and export it to a TXT file I get all the line items of the that I want without the header of the query field name. When I run the following command;

DoCmd.TransferText acExportDelim, "Decompress2 Specification", "qry_FileNameChange2", "J:operationsDecompress2.txt", True

(Where "Decompress2 Specification" is the name of the Spec)

I get the name of the field as the first line item and then all the line items I am looking for. I use the same Spec when I manually run it or when I run it from the code. how I can get rid of the first line item when I run it from the code?

I run a batch file to change the txt extension to bat.

View 1 Replies View Related

Batch File That Kicks Everyone Out Of Access Database

Nov 14, 2007

does such exist ?

View 9 Replies View Related

General :: Opening Access Database From Batch File Or VBS

Dec 20, 2012

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).

View 3 Replies View Related

Batch File To Automatically Digitally Sign Access Database

Jun 24, 2013

As I am having difficulty keeping my database at work digitally signed due to other users using the database; I was curious if I could create a batch file to automatically run at night to sign the database, so that it can automatically update in the AM, without being prompted questions. Or something of this sort?

View 12 Replies View Related

Modules & VBA :: Backup Backend Using Batch File?

Aug 14, 2014

I've created some code to make a backup of my database backend. I've tested it and it seems to work fine, I just have some questions about it's use. Here's the code:

Code:
Public Sub backupBackend()
Dim TestFile As String
Dim strReplFile As String
Dim copyFromLocation As String
Dim copyToLocation As String
copyFromLocation = "S:Trust 2 AnalysisData"

[code]....

It will be triggered by a button push. It creates a batch file to do the copy operation and then delete itself.

In an ideal world I would schedule the backup at a safe time through the Windows scheduler, but our IT department won't allow me to do so.

The concern I have is that we could potentially press the backup button while a user is performing an action that writes/modifies data. If this were to happen would my backup potentially contain corrupted data?

If so, is the workaround to simply press the backup button when nobody is using the database?

View 3 Replies View Related

Creating A Hyperlink To Open A PDF File?

Jan 22, 2014

I have a form, and on that form I have a textbox called RefDwgNo (user not allowed to make changes...just for viewing). Displayed in this textbox is the name of a file (without the .pdf extension). I changed the textbox to 'is hyperlink' and added to OnClick- this code:

Private Sub RefDwgNo_Click()
FollowHyperlink "***private***engineering_data***Private***Des ignFitoutLabel Plate\_LATEST REV"
End Sub

The user needs to actually open the .pdf file, not the folder its located in. How do I add the file name from this textbox to the code above?

View 10 Replies View Related

Creating A Command Button To Open A File

Jun 13, 2006

I have set up a database that houses file locations. The form that I have made shows a job # and the files that correlate with it. I would like to set up a command button that will read the file name and open it in Excell. If any one know how to do this I would greatly appreciate the help.

View 3 Replies View Related

Import A Text File Weekly Within A Batch File

Jan 30, 2006

hello everyone, i really need some detailed help as the deadline is approaching and I need to find a solution for this. Any help would be greatly appreciated

I currently have a batch file that ftps a text file from a Red Hat Linux Server to my W2k C:. I would like to make another command in the batch file that imports this text file into an existing access table. I would like the text file to repopulate the table everytime it is imported. I do not want the data added on to the existing data in the table.

Thank you for your time and insight.!!!:)

View 3 Replies View Related

General :: Batch File To Check (version) Of A File?

Aug 28, 2012

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.

View 14 Replies View Related

Modules & VBA :: File Open Dialog Does Not Allow Selection Of All File Types

Oct 4, 2013

I recently upgraded a DB from 2003 to 2013 and ran into the following problem.

I have a button that opens a file dialog box and allows the user to upload a file to a predetermined location (and store the address as a hyperlink). I borrowed this code from someone else on here and modified it slightly.

In any case, the button still works, but now when it opens it doesn't have an option for "All files" under file types. So I can upload MS Office files, text files, etc., but not PDF files which are by far the most common types my users upload.

Here's my code and a screenshot is attached.

Private Sub Command35_Click()
Dim dd As Integer
Dim fileDump As FileDialog
Set fileDump = Application.FileDialog(msoFileDialogOpen)
dd = fileDump.Show

[Code] ....

View 3 Replies View Related

Normalization For Creating Batch Process Records

Nov 28, 2011

I am just getting started creation a new database for batch process production records that will be filled completed in the field real time. I had started out creating a table that had fields for each step of the process. Such as:

[Batch number]
[Equipment] (lookup)
[Process] (lookup)
[Step 1 start time]
[Step 1 comments]
[Step 2 Start time]
[Step 2 comments]
[Step 3 start time]
[Step 3 comments]

I have seperate tables for listing equipment, Processes and standard times for each step of the process. I realize that another way of doing it would be to create another table with a list of the process steps and then my table would look somethink like this.

[Batch number]
[Equipment] (Lookup)
[Process] (lookup)
[Step] (Lookup)
[Start time]

The problem is, I want a form (batchsheet) that already has all of the steps listed for the data entry person and simply a blank for them to enter what time they completed each step. I dont want the client to have to select a [step].

View 1 Replies View Related

Batch File

Jan 24, 2006

I need a batch file that will ask a question :

enter 1 for windows 2000
enter 2 for windows XP

Depending on what the user entered, there will be a copy command.

example :

If answer = 1 then
copy command
If answer = 2 then
a different copy command.

Any help will be appreciated.

View 2 Replies View Related

Batch File For Current Fe

Jun 13, 2005

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

:end
rem pause
cls
exit

Any thoughts/suggestions would be appreciated.

Thanks,

Toni

View 2 Replies View Related

Batch File Issue

Jun 20, 2005

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

Thanks

View 1 Replies View Related

Batch File To Start DB

Nov 10, 2005

Hi

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

:End
Exit

Any ideas?

JC

View 4 Replies View Related

Batch File Datbase Backups

Feb 7, 2006

hi all,

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.

any ideas?

View 1 Replies View Related

Batch File To Close Access Db

Jun 6, 2007

I am trying to make on load even to check if server side applicate FE is same as of client side FE. For this I am quering a field to check no and if it is not same then to start a batch file which copies and replaces client side FE.

Problem is if access application is running, it gives error. So I need to close the db and replace application.

I know xcopy command to replace file but do no how to trigger close application.

Please advice or else any new method is welcome.

View 4 Replies View Related

General :: Deploy MDE With Batch File?

Mar 6, 2013

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??

View 6 Replies View Related

Execute A Batch File From VBA Code?

Jan 26, 2012

I am using MS Access 2007 and I am trying, from my VBA code, to execute (or run) a Batch file. Now the batch foile works, but not from my code.

I used to be able to just do this --> Call Shell("S:AccountingAPTex FilesFile List Generator.cmd ", 1) And it would runit. But using this I get a message telling me that it is an invalid procedure call. So upon looking around on the net I found tha ton place said that with MS Access 2007 you need to do this:

Call Shell(Environ$("COMSPEC") & " /c S:AccountingAP1099 ITEMSW9 FolderCorrected 2011 W9File List Generator.cmd ", vbNormalFocus)

But while it does not error out it dooes noting eitheer. What the batch file does, when it works, is produces a list of all the file names in a folder.

View 4 Replies View Related

Database Does Not Want To Open MDA File

Jul 28, 2013

after I upgraded to win 7 my database refuses to use an .mda file, to which I refer to (Visual Basic menu, extras). I get the message that I should have installed this .mda file with administrator rights. I am the only user and administrator of my computer, and i cannot install this file (which I bought a long time ago) other than put it either into ....../office12 or into windows/system12 or windows/syswow64.I tried to register it under DOS (with administator rights) with regsvr32.exe but there I got the message that I should check whether this .mda is a 32 or 64 bit version.

View 3 Replies View Related

Batch Process To Open Password Protected Access Db

Jan 30, 2008

Hi All

I need to schedule the opening of a MS Access database which is password protected.

I think the best way to do this would be to use schedule a batch process to run, can anyone help with the script to create a batch proccess to only OPEN and CLOSE an MS Access database?

Thanks

View 1 Replies View Related

Batch File For Opening Secured Databases

Jan 17, 2007

I'm sure most people use Windows shortcuts to open their secured databases, but I found that it didn't always work (depending on which computer I used). Editing a shortcut is pretty confusing since the command is all on one line. I decided to make a batch file to open my secured databases instead. Here's a batch file I use to open a database of mine:@ECHO OFFREM - Set variables to be used in the batch file.SET BACK=Z:BobManager Listdb_be.mdbSET FRONT=Z:BobManager Listdb_fe.mdbSET WRKGRP=Z:BobManager ListSecured.mdwSET OFFICE=C:Program FilesMicrosoft OfficeOFFICE11MSACCESS.EXEIF EXIST "%OFFICE%" GOTO PROMPTSET OFFICE=C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXEGOTO PROMPTREM - Ask the user which end to open.:PROMPTCLSSET /P dbChoice=Do you wish to open the frontend(1) or the backend(2)? if "%dbChoice%" == "1" ( "%OFFICE%" "%FRONT%" /wrkgrp "%WRKGRP%" GOTO END)if "%dbChoice%" == "2" ( "%OFFICE%" "%BACK%" /wrkgrp "%WRKGRP%" GOTO END):ENDThis isn't the simplest batch file ever, but if you want to use this you just need to change the paths to your frontend, backend, workgroup file, and your version of Access. If Office was installed in the default location you shouldn't need to change those lines, unless you know you'll always be using the same version of Access.

View 1 Replies View Related

Compact Access 2000 From A Batch File

Apr 14, 2008

Hi All

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 ideas?

Cheers.

View 4 Replies View Related

Running A Batch File From Command Prompt Using VBA

Apr 25, 2008

Hi,

I know this can be done but I'm a novice at VBA. I have a batch file AutoLoop.bat which I run from command prompt at the moment. The idea is to run a VBA routine behind the onClick event of a command button in Access which would run this batch file in command prompt automatically. Say if the batch file path is I:AUTOGENLOOPGENAutoLoop.bat,
what VBA code can be used.

Thanks for any help.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved