Call Shell(...) - Wait Until App Ends

Feb 4, 2007

Hey guys!

just wondering if there is an way to command

Call Shell("my_bakcup_string",1)

and wait 'till the bakcup program ends to go next command in VBA

thank you! :cool:

View Replies


ADVERTISEMENT

Wait For Shell Execution To Finish?

Jun 19, 2007

I'm using hte Shell() function but this doesn't wait for the executable file to finish so I'm looking for a command line function that would wait until the executable file is finished executing...

I saw this function WaitFor but it is not supported in MS-Access? So, what do I do?

Thanks...

View 7 Replies View Related

Modules & VBA :: Static Shell Function Call Works But Dynamic Call Fails

Sep 4, 2013

I'm having to recode some old MS Access DBs so they will run in the following environments:

Office 2000 on WinXP
Office 2003 on WinXP
Office 2010 on WinXP
Office 2000 on Win7
Office 2003 on Win7
Office 2010 on Win7

When I wrote my code for Office 2000 on WinXP things were simple because directory paths were the same across all computers and I could hard code pathing when using a shell command to launch other files.

My new approach is to make a function call to the Windows registry to determine the default executable and path for opening a file based upon its extension (see apicFindExecutable in basWindows API module).

I'm able to use code to create a shell call and debug print it to the immediate window. If I put my cursor in the immediate window at the end of the shell call and hit [enter] the external file will open as desired. If I try to open the external file directly through code, I get a file not found error.

To recreate the error take the following steps:

(1) browse to files that are accessible from your computer
(2) click the PREPARE DATA AND OPEN MAIL MERGE DOCUMENTS command button

Shell function call is made by the fnOpenFile function located in the basOpenFile module. There has to be a trick here that I'm missing.

View 5 Replies View Related

Modules & VBA :: Shell And Invalid Procedure Call Or Argument

Feb 23, 2014

I have a form with a button to print preview a report. This report needs one input parameter before executing. The computer this will run on is a touch screen and does not have a keyboard. Windows 7 has a "on screen keyboard" program. I want this to run first so that my user can input the parameter.

I have the following which throws an "Invalid procedure Call or Argument"

Sub CallTeclado()
Dim RetVal
RetVal = Shell("c:windowssystem32osk.exe", vbNormalNoFocus)
End Sub

View 4 Replies View Related

Modules & VBA :: Invalid Procedure Call Or Argument Using Shell Command?

Feb 6, 2015

I'm developing an application where I want to call the keyboard up on the screen when a user enters a field. This is my setup:

Windows 8.1 32 Bit, Access Runtime 2010.
Exact lines of code are:

Dim RetVal
RetVal = Shell("C:Program FilesCommon Filesmicrosoft sharedinkTabTip.exe")

These lines of code work perfectly fine on my development PC which is running Windows 7 64 bit, Access/Office 32 bit.

I know the path to the exe is good. I can navigate and double click it and it works great. but the shell command is resulting in the invalid procedure.

View 4 Replies View Related

Modules & VBA :: Using Shell Function To Dynamically Call Different Pdfs That Are In A Directory?

Aug 13, 2013

I'm looking to use the shell function to dynamically call different pdfs that are in a directory. However I'm getting run time error 5 "Invalid procedure or call argument".

Here is the code (very basic I know)..

Private Sub Liste_Documentation_DblClick(Cancel As Integer)
Dim PathName As String
PathName = Me.Liste_Documentation.Column(2)
' Debug.Print PathName
Shell PathName
End Sub

A typical filepath name is as follows..

S:VenteVendeursMarcCRMDOCSDiligences KYC - LABFT - V 2013 04 23.pdf

View 8 Replies View Related

I Need My Code To Wait... (modal?)

Mar 29, 2005

Hi

I am importing a database, but I first need a couple of parameters from the user.

Now I write this mostly in Access VBA, since I come from programming background.

What I want to know is how can I let my code wait for the modal form to close before continueing?

Thanks

-Canderel


Sub ImportFoo()
'//Prepare files for import

docmd.OpenForm "frmImportParameters" '//(with modal, pop-up, etc.)

'//---- WAIT For form to close ---- THIS IS MY Question...

'//Import Code... This runs before I close (actually before the form opens about)
End Sub

View 14 Replies View Related

General :: Doesn't Seem To Wait For Second Click

Aug 28, 2013

I have a listbox in which I am using both the single and double click events to return different data. It seems that when I try to double-click it is interpreted as a single click! It doesn't seem to "wait" for the second click. I have been coding for years but never saw this before.

View 6 Replies View Related

Modules & VBA :: Getting Internet Explorer To Wait

May 5, 2014

Page loads, transaction is submitted, everything works fine 99% of the time, however, on occasion, the page loads a mini error page where you have to click a blue link for it to continue. Here is where I am stuck, if the blue link appears, I get an error that the object is not set, if I move my cursor up one row (For Each htmlInput) it will continue without error. How do I get IE to give the error message a chance to load before checking it out?

Code:

'click the SUBMIT button
For Each htmlInput In HTMLDoc.getElementsByTagName("Input")
If htmlInput.Value = "Submit" Then

[Code]....

View 1 Replies View Related

Advanced VBA Wait In Subroutine Until Form Is Closed

Jul 7, 2004

Hi all.
I have a form that opens up another form when you click on a button. The button does more than just open the form, it does other checks. I want to wait until the opened form is closed to continue with the subroutine. Is this even possible in VBA? I was wondering if there was a frmFormName.IsOpen or some kind of flag that would tell me if a form is open or not. Any help would be greatly appreciated. Thanks in advance.

Sub open
Checks things
Checks things
checks things

Opens form(frmDetails)
Wait for form to close (THING I DON'T KNOW HOW TO DO IF POSSIBLE)

Checks things
Checks things

end sub

View 2 Replies View Related

Forms :: Timer Event - Wait Until Form Fully Loaded Before Visible

Nov 7, 2014

I have tried using a timer event to not show a form until it is fully loaded, to no avail.

Code:
If CurrentProject.AllForms("FONNewEdit").IsLoaded = True Then
Me.Visible = True
Me.TimerInterval = 0
End If

I have tried using the onload, onopen but the form still displays before being fully loaded.

View 7 Replies View Related

Multiple Back-ends

Oct 16, 2006

For the company I am doing my thesis, I developed a tool in MS Access for monitoring sales data, customers, employee data etc…
The tool is working with a front-end database, installed locally on every PC and a Back-end on the company’s server ( Located at city Genk)
The tool is working smooth on the location in Genk.
But then the problem occurs when this tool had to be used on an other company location, 100km from the server (Antwerp); the waiting and loading times are very long, even for the smallest data.

Obvious this is because the companies network from one location to another is too slow. But because of financial reasons I’m looking for a software solution.

An idea is to create a Back-end server for each location, for all local data and one general back-end server for unique data ( for instance: there has to be a unique calculation number for each calculation made in the entire company).
I think this will decrease waiting times for some data, but not all…

Or does anyone have an other idea?

View 1 Replies View Related

Front And Back Ends

Jul 25, 2007

Hi guys,
I need help with security settings and that. I have a database which i want available on a shared server. Basically i only want people to beable to see one form but not beable to see anything else or make any changes to this form.

Do i need to split and make a front and back end? I will want to make occasional changes to tables etc.. and so would want this to automatically update on the database seen by everyone else.

Sorry, not making much sense but am bit confused about it all!

Any help from some clever peeps?
Ta

View 6 Replies View Related

Multiple Back-ends

Oct 16, 2006

For the company I am doing my thesis, I developed a tool in MS Access for monitoring sales data, customers, employee data etc…
The tool is working with a front-end database, installed locally on every PC and a Back-end on the company’s server ( Located at city Genk)
The tool is working smooth on the location in Genk.
But then the problem occurs when this tool had to be used on an other company location, 100km from the server (Antwerp); the waiting and loading times are very long, even for the smallest data.

Obvious this is because the companies network from one location to another is too slow. But because of financial reasons I’m looking for a software solution.

An idea is to create a Back-end server for each location, for all local data and one general back-end server for unique data ( for instance: there has to be a unique calculation number for each calculation made in the entire company).
I think this will decrease waiting times for some data, but not all…

Or does anyone have an other idea?

View 1 Replies View Related

Shell()

Feb 10, 2006

Hello all,

I use Shell() to open an external program - this works absolutely fine on Windows XP - but I believe it is causing a problem on 2000.

I am using the following code:
Shell """C:Program FilesLindenhouse Software LtdInvuFirstInvuFirst"" FirstOffice C:illingtemp.xls", vbNormalFocus

I get an invalid procedure call on the 2000 machine?

Any ideas?

View 2 Replies View Related

Shell() Help?

May 17, 2006

Ok, this is very odd. I am running a small DOS executable from within a db. I am using the shell command. The DOS exe is suppose to create a *.txt file. The file creates the *.txt file if I launch it from Windows Explorer. Howeve, if I use the Shell() command, it does not create the *.txt file. What can I use in place of the Shell() command to execute the file as if it was being executed from within Windows Explorer. I don't understand why it isn't working with the Shell() command...

View 14 Replies View Related

Cancel Queries' Changes Before Operation Ends

Nov 5, 2005

WHAT IS WRONG WITH THIS CODE:

Dim wsp As Workspace
Dim fInTrans As Boolean

On Error GoTo C4Err

fInTrans = False
Set wsp = DBEngine.Workspaces(0)

wsp.BeginTrans
fInTrans = True

DoCmd.OpenQuery "query1"
DoCmd.OpenQuery "query2"
DoCmd.OpenQuery "query3"
DoCmd.OpenQuery "query4"

wsp.CommitTrans

C4Exit:
Set wsp = Nothing
Exit Sub

C4Err:
MsgBox Err.Description
If fInTrans Then
wsp.Rollback
End If
Resume C4Exit

I WANT TO RUN 4 BIG APPEND QUERYS BUT IF USER PRESS ESCAPE BUTTON BEFORE ALL QUERYS ARE FINISHED - THEN ALL RECORD CHANGES MADE BY THOSE QUERYS MUST BE CANCELED.
SO I MADE THIS CODE. BUT IT DOES NOT WORK.

View 14 Replies View Related

Modules & VBA :: Using Same Module With 2 Front Ends?

Jun 24, 2015

I have a small system that consists of a back end data base and 2 front ends. having 2 front ends was a historic reason but they cover 2 distinct processes in the system.

I now have the need for using the same module(s) in both front ends. Each has a copy which is fine if nothing changes but when it does I have to apply the changes made (or copy over in its entirety) from one front end to the other.

Although this is no big deal I can forsee it slipping through the net.

Can 2 front ends access the SAME module and if so how?

View 12 Replies View Related

General :: Many Front Ends And Only One Backend

May 7, 2013

I have (on a company network) a FrontEnd .accde and a backend .accdb - currently ~ 10 users (some over wifi - slow!)The FrontEnd is becoming a rather large file ~ 10 MB and is also becoming slower.I am looking to separate this in to 3 FrontEnd files as to simplify and to lessen the file sizes etc.

My question is - are there any issues around a 3 x FrontEnd databases all connecting to 1 x backend database holding all the tables - over a network?

View 11 Replies View Related

How To Create Field Whose Name Ends With A Blank?

Mar 19, 2015

I have a very unusual situation where I need the name of a field in an Access table to end with a blank (i.e. space). I tried doing it trivially while in Design View but no dice. I tried it through some SQL along the lines of the following pseudo code

Select [old table].[Address] as [Address2 ], [old table].*
Into [new table]
From [old table]

but the new field's name "Address2 " lost the final space.A third try was through some syntax for an Alter Table statement to add or modify a field. It didn't pan out.

View 2 Replies View Related

US Daylight Savings Time Ends 4 Nov 2007

Nov 3, 2007

Hi -

Just a reminder that US Daylight Savings Time ends 4 Nov 2007 (First Sunday in November) at 0200, at which point the time (minus Indiana) reverts to 0100.

If getting your PC to cooperate is a problem, you might check the following for guidance:
http://www.uic.edu/depts/accc/systems/daylight/windows.html

Best Wishes - Bob

View 14 Replies View Related

General :: 2 Front Ends And One Table Structure

Sep 10, 2013

I have recently asked about being able to use my table system online. i have just thought. what about creating a front end that works online. still have the front end on the desktop and the table system on the desktop but have both of them connecting to the one table system.

View 8 Replies View Related

General :: How To Link One Front End With Many Back Ends

Mar 8, 2013

i have one front end access database and want to connect with more than one back end at time but both back ends have same table names

View 2 Replies View Related

VBA Code To Search And Replace When String Ends With A Value

Sep 11, 2012

I have the following in Column A

url.com?valueA
url.com?valueA&valueB
url.com?valueC

I need a function that

If string "ends with" valueA or ValueC, then replace it with ValueD

View 2 Replies View Related

Sorting Ends Data Entry Mode

May 14, 2013

I have a form containing a subform. The subform is opened in data entry mode, so it displays no existing records. However if the user right-clicks the form and selects a sort, all records are displayed. Is there any way to stop this behavior so that the form remains in data entry mode?

View 5 Replies View Related

Shell Object Rename Help

Jan 24, 2007

Hi~
First off, sorry about the title; I couldn't really come up with anything that made sense.

Here's what I'm trying to do, I am trying to rename a table in one database from within another (there is a really good reason why I want to do it from somewhere other than the db that contains the object). Here is what I have so far in my code:


Private Sub cmdTest_Click()

Dim strSource As String 'the db that contains the table I want to rename

strSource = Application.CurrentProject.Path & " est1.mdb"

'Shell the file
Shell "C:Program FilesMicrosoft OfficeOFFICE11msaccess.exe """ & strSource & "", vbNormalFocus

'Acknowledge security and open
SendKeys "NO", True

End Sub

of course I'm missing the part that would rename the object. I guess what I'm trying to do at this point is be able to run the docmd.rename command and have it execute in test1.mdb (the shelled db) as opposed to test2.mdb (the db that contains the code). Is this possible? How?

Thanks

View 4 Replies View Related







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