Modules & VBA :: How To Disable Buttons From Another App Which Is Called By Shell Execute

Sep 30, 2013

I'm using shellexecute in my form whenever a picture is clicked the respective program/ application will open to show the picture. Because I want to see the picture more clearly by zooming it in or out. But the problem is I don't know how to disable the delete button and prev./next button, because I want the user use the program only to zoom it in.

View Replies


ADVERTISEMENT

Opening File In Shell Execute

Dec 20, 2005

I seem to be having a problem opening a file if there happens to be any spaces in the file name. If I open a .pdf no problem acro reader opens it but if it is in word or excell or any other tells me that the file can not be found and seems that only the first part of the file name before a space in the name and the file extention.
example: "Test it.doc" would appear as "Test.doc". somewhere it seems to be trimming the file name.

View 1 Replies View Related

How To Disable Navigation Buttons?

Feb 19, 2005

Hello!
I have little problem. I have form which have linked Child table. On that Child table in a form I have displayed Navigation Buttons. I don`t want to see them, but I can`t disable them. I tried everything.

Please, help..... :confused:

View 3 Replies View Related

Disable PageUp And PageDown Buttons

Feb 9, 2007

Good day!

Would it be possible to disable the Page Up and Page Down keyboard buttons? Also, the Up and Down arrows? If yes, how?

Thank you.

sheila

View 2 Replies View Related

How To Disable Mouse Scroll Buttons On Forms?

Oct 10, 2006

Hi!
I want to disable the usage of mouse scroll on my forms. Because, as things are now, you may accidently choose/ scroll to another Record/ Post, when editing data for one specific record.

How do I accomplish disabling usage of mouse scroll?

View 3 Replies View Related

Forms :: Disable Other Navigation Buttons Tab When One Tab Is Active

Jul 26, 2015

I have few forms for which I have created a navigation form. Now in this navigation form, I have 4 tabs/ forms. I want to disable other 3 tabs/ forms when either of the one is active. I want to restrict user from switching the tab leaving the task incomplete in one tab.

It should show a popup msg, that "the task is active. Please submit before leaving the page."

View 1 Replies View Related

Forms :: Disable Navigation Buttons On Form

Mar 20, 2015

In A2007 if you disable the Navigation Buttons on the form the Me.RecordCount will be set to 1 when the form opens ? I replace the Nav buttons with my own set but my "Go Next" button will not work untill I hit "Go to Last". This apparently restores the recordset count to the correct number of records.

View 14 Replies View Related

General :: Disable Title Bar Minimize / Restore And Close Buttons

Oct 31, 2012

How to disable the Minimise, Restore and Close Buttons at the very top right hand corner of the Access application?

I have got buttons on my database to open / close everything so no need for them, even to hide the full Title bar probably be okay.

I am running Access 2007.

View 12 Replies View Related

Forms :: Disable Or Hide Minimize / Restore And Close Window Buttons On A Form

Mar 9, 2014

I need to disable or hide the restore, minimize and close window buttons found in the top right hand corner of a form.

I navigation buttons that controls open, close etc already set up.

View 4 Replies View Related

Modules & VBA :: Shell - How To Direct To A File

Jun 24, 2013

I use shell to run .exe file eg 7za.exe. How can i direct the output to a text file.

The following don't seem to work

shell "7za.exe > " & chr(34) & "c:log.txt" & chr(34)

or

shell "7za.exe > c:log.txt"

Problem has nothing to do with wait to complete process.

how to direct out to a file via VB.

View 3 Replies View Related

Modules & VBA :: Undefined Function For A Module Called In A Query?

Sep 8, 2013

This module is giving me the "undefined function" error message when I try to run my query. I don't know why, but I have checked that there are no references with "missing" and there are not. I also added the word "Public" to the function becasue that was advised by another forum user. I thought it worked perfectly the first time I ran this query, but now it is not working and I do not recall making any changes. I have called the module basFunctions:

Option Compare Database
'************************************************* *********
'Declarations section of the module
'************************************************* *********
Option Explicit
'================================================= =========
' The DateAddW() function provides a workday substitute
' for DateAdd("w", number, date). This function performs
' error checking and ignores fractional Interval values.
'================================================= =========
Public Function DateAddW(ByVal TheDate, ByVal Interval)
Dim Weeks As Long, OddDays As Long, Temp As String

[code].....

View 3 Replies View Related

Modules & VBA :: Opening File Using Shell / CPAU

May 27, 2015

I want to open files from a networklocation from VBA, only normal users don't have access to that location (and should preferably not get it).

I instead of using shell("explorer.exe filepath") to open files using windows standard app for the file, which needs userpermissions to the path the file is located, for the currently logged in user.

I'm trying to use CPAU in combination with Shell, because using CPAU you can pass a user/password that has permission to open a process

The only problem is that the filepaths have spaces in them and that is Always a bit of a tricky thing to tackle.

So, for example, this works:

shell("N:GuidelineOntwCPAU -u DomainUser -p password -LWOP -ex " &
Chr(34) & "C:windowsExplorer.exe c: emp est.pdf")

But I cannot get it to work with a file that is on a path with a space in it (or with a space in the name), like

Code : N:EngineeringJB-MATBBBB-004_Panel PinBB-004_Panel Pin.pdf

I'm trying all kinds of thinks:

- adding chr(34) at certain places
- using """
- the above in different versions

But to this point without result.

Trying to figure out the plain cmdline:

Code:
N:GuidelineOntw10_Ontwcpau -u Domain/User -p Password -ex "c:windowsExplorer.exe "c: emp est.pdf""

Doesn't work:

Code:
N:GuidelineOntw10_Ontwcpau -u Domain/User -p Password -ex "c:windowsExplorer.exe "c: emp est 1.pdf""

(difference in filename with a space in it)

The last command start explorer, but doesn't open the file (just as the first line I posted, it opens Explorer, but not the file. Must be something with the way I pass the filename?)

Code : explorer.exe "C: emp est 1.pdf"

Also works in commandline...

View 4 Replies View Related

Modules & VBA :: Shell Function To Open Calculator

Dec 17, 2014

I want to open the Calculator by clicking a command button (using the On Click event).

I have tried the code below but can't get it working. What do I need to change?

Private Sub Command7_Click()
Dim RetVal As Integer
RetVal = Shell("C:Windowscalc.exe", 1)
End Sub

View 2 Replies View Related

Modules & VBA :: Call A Preimport Function Whenever Transfer-spreadsheet Is Called?

Oct 16, 2014

I know its not possible. But Just wanted to confirm. Not at all possible?

Code:

Function PreImport(BookToImport As Workbook)
For Each cell In BookToImport.Sheets(1).Rows(1).Cells
cell.Value = Trim(cell.Value)
Next cell
BookToImport.Sheets(1).UsedRange.Rows(1).Replace ".", "_"
End Function

View 1 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 :: SHELL Command Always Opens The Folder Minimized

Sep 30, 2013

I'm trying to use this command:

Code:
Shell "C:WINDOWSexplorer.exe """ & Me.txtSource & """, VbMaximizedFocus"

to open a folder from within Access 2007 & Windows7. It works, but it always opens the folder minimised, whether I use VbMaximizedFocus or VbNormalFocus. It used to work properly in Access 2003 & WinXP.

View 2 Replies View Related

Modules & VBA :: GetElementByID With Internet Explorer Using Shell Windows

Jul 16, 2013

I can currently open a new internet explorer instance, navigate to my URL, then use the .getElementByID to insert my preference into a textbox on the page. Looks like this:

Code:
Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate "URL of my Choice"
Do While oIE.Busy Or oIE.ReadyState <> READYSTATE_COMPLETE
DoEvents

[Code] ....

View 7 Replies View Related

Modules & VBA :: Shell Command Not Working With Spaces In File Name

Oct 21, 2013

I am in trouble with the shell ocmmand,i have a text box "ExcelPath Location" in which there is a path of excel file i am using below code to open the excel file but it gives an error:

Code:

Private Sub Command11_Click()
Dim str As String
str = ExcelPathLocation.Value
strPath = Dir(str)
Shell "excel.exe" & """" & strPath & """", vbNormalFocus
End Sub

the value of text box is

O:QA FilesQC ReportingPending ReviewB329129)419479_BoxPort_RAMANDEEP BRAR_(10192013.xlsm

it gives run time error : 53 file not found.

View 3 Replies View Related

Modules & VBA :: Shell Picture Viewer Command Opens Minimized?

Aug 13, 2015

I'm having trouble with a shell() command in my vba.

I'm trying to call up the picture viewer showing the file of the photo I clicked on in a form. Everything is happening as expected - the file opens in Windows Photo Viewer, but it is minimized.

I can open a picture fine from Windows Explorer, but something about my shell command is forcing a minimize.

Here is my code:

Code:
Dim sFile As String
PicFile = "C:Pics" & Me!PicName & ".jpg"
Shell "RunDLL32.exe C:WindowsSystem32Shimgvw.dll,ImageView_Fullscreen " & PicFile

I would have assumed ImageView_Fullscreen would do what I want!

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

Modules & VBA :: Error (Invalid Use Of Null) In A Function Called From A Form Current Event

Nov 18, 2013

I am struggling trying to execute a function inside a Form_current event to display some stats.

The Function is this:

Code:
Function FlightsByAircraft(Aircraft As Long) As Long
Dim rst As DAO.Recordset
Dim dbs As DAO.Database
Dim str As String
str = "SELECT * FROM tblFlights WHERE AircraftID = " & Aircraft

[Code] ....

The code for the Form_Current event is this:

Private Sub Form_Current()
txtStats1 = FlightsByAircraft(Me.AircraftID)

Very simple. Well, the problem is when I move to a new record, a error message comes up: "Run-time error '94' - Invalid use of Null". It is because the AircraftID is not populated at that time. I tried to insert in the function code something like that:

Code:
If IsNull(Aircraft) then
exit function
else
.... (the DAO.Recordset code)

but it doesn't work.

View 8 Replies View Related

Modules & VBA :: How To Execute SQL In Automation

Aug 7, 2015

I'm opening a second database (db2).

Copying the structure of a db2 table to db3.

Populating the table in db3 with a subset of records from db2.

I've gotten as far as opening the db2 and copying the table structure. Can't figure out how to run the query using execute rather than docmd.openquery.

Code:
Dim appAccess As Access.Application
Set appAccess = New Access.Application
appAccess .OpenCurrentDatabase "DbPathString"
'copy the table structure to dbQn, overwrites any previous with same name

[Code] ......

View 4 Replies View Related

Modules & VBA :: How To Execute A DoCmd From Within A Connection State

Feb 24, 2014

I'm trying to do something with Excel and Access. From Excel 2007, I need to open an Access database exclusive, import from Access to Excel a table, do some work within Excel, and then start a macro within the Access database. Briefly, here’s what I have

1) To open the database exclusively:

Set connDB = New ADODB.Connection
With connDB
.Provider = "Microsoft.ACE.OLEDB.12.0"
.Mode = adModeShareExclusive
.Open strdbpath 'path to database
End With

2) To import from Access:

strSQL = "SELECT * FROM [" & tn & "];" 'tn is Access table
If connDB.State = adStateOpen Then
Set objRS = New ADODB.Recordset
objRS.Open strSQL, connDB, adOpenForwardOnly
On Error Resume Next
objRS.MoveFirst
If Err.Number = 0 Then
On Error GoTo 0
fieldCnt = objRS.Fields.Count
For fieldNum = 0 To fieldCnt - 1
ws.Cells(1, fieldNum + 1).Value = objRS.Fie(fieldNum).Name
Next fieldNum
ws.Cells(2, 1).CopyFromRecordset objRS
End If
End If

3) To start a macro:

DoCmd.RunMacro "Daily Import"

Everything seems to work until the ‘DoCmd’ statement where I get a “You can’t carry out this action at the present time” error message.

View 8 Replies View Related

Modules & VBA :: Execute A Query That Does Not Include Specified Expression

Aug 21, 2014

I am getting the following error message in strsql:You tried to execute a query thats does not include the specified expression 'ScanDate=20140730 and SCanhour=8' as part of an aggregate function in the following strsql.

Code:
Call func1("Z", 8)
Public Sub func1(b As String, a As Integer)
strsql = "SELECT Count(BatchNo) AS CountOfBatchNo, Sum(Envelopes) AS SumOfEnvelopes, Sum(Cases) AS SumOfCases, Sum(Pages) AS SumOfPages, ScanDate, [Type] & Format([Type1],'00') & Format([Type2],'00') AS QueueNo " _
& "FROM jabberwocky " _
& "group By ScanDate, [Type] & Format([Type1],'00') & Format([Type2],'00') " _
& "HAVING ScanDate=" & J & " and Scanhour=" & a & ""
End SUb

View 8 Replies View Related

Modules & VBA :: Command To Execute When Form Is Closed Or Quit

Feb 5, 2015

There is a form where whenever the form is closed, the below code needs to execute:

If IsNull(Me.CostPerPiece1.Value) = True And IsNull(Me.CostPerPiece2.Value) = True And IsNull(Me.CostPerPiece3.Value) = True And IsNull(Me.CostPerPiece4.Value) = True And IsNull(Me.CostPerPiece5.Value) = True Then
Me.AllowAdditions = False
DoCmd.SetWarnings (0)
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings (-1)
Else
Call AppendQuoteCharges
End If

The If Then just looks at if certain fields are all null and if so, it deletes the current record. If at least one field is not null, the AppendQuoteCharges routine is called.

The form has 4 or 5 navigation buttons that close this form and send you to a different one. I've added the above code to each of those buttons before it runs the DoCmd.Close Form. I also have a Exit button that runs a DoCmd.Quit. I developed this months back but I'm pretty sure I added the above code under each button's click event rather than a Form On Close event because Form On Close does not execute after a DoCmd.Quit command

In rare cases, the form is being closed without the routine being ran. I think if a user clicks the Close button in the top right of Access (the X), it might be running a DoCmd.Quit which is doesn't run this code.

How can I be sure that whenever the form is closed or exited, the code is ran? Is there a way to tie this code to the user clicking the X in the top right?

View 2 Replies View Related







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