I'm trying to use a command button to open a windows folder related to the
current record. The record has a Location field that contains the name of
the windows folder, in the current directory that needs to be opened. The
code for the command button is...
Dim RetVal
RetVal = Shell("explorer CurrentProject.Path & " \ " & Me.Location",
vbNormalFocus)
When the button is pressed, I get an error - Type Mismatch
I am using the following code to view a picture of the relevent file in an
image box in the record:
Me.imgEmployee.Picture = CurrentProject.Path & "\" & Me.Location & "\" &
Me.Headshot
This code works fine. Also, if I hard code a file location into the first
line of code, it also work fine:
Dim RetVal
RetVal = Shell("explorer c:\employees\", vbNormalFocus)
This will open up the employees folder on the c: drive 2 3063
On Fri, 03 Oct 2008 01:11:27 GMT, "Kevin" <no**@email.comwrote:
>I'm trying to use a command button to open a windows folder related to the current record. The record has a Location field that contains the name of the windows folder, in the current directory that needs to be opened. The code for the command button is...
Dim RetVal
RetVal = Shell("explorer CurrentProject.Path & " \ " & Me.Location", vbNormalFocus)
When the button is pressed, I get an error - Type Mismatch
I am using the following code to view a picture of the relevent file in an image box in the record:
Me.imgEmployee.Picture = CurrentProject.Path & "\" & Me.Location & "\" & Me.Headshot
This code works fine. Also, if I hard code a file location into the first line of code, it also work fine:
Dim RetVal
RetVal = Shell("explorer c:\employees\", vbNormalFocus)
This will open up the employees folder on the c: drive
Try
RetVal = Shell("explorer " & CurrentProject.Path & " \ " & Me.Location",
vbNormalFocus)
Wayne Gillespie
Gosford NSW Australia
"Wayne Gillespie" <be*****@NObestfitSPAMsoftwarePLEASE.com.auwrote in
message news:5t********************************@4ax.com...
On Fri, 03 Oct 2008 01:11:27 GMT, "Kevin" <no**@email.comwrote:
>>I'm trying to use a command button to open a windows folder related to the current record. The record has a Location field that contains the name of the windows folder, in the current directory that needs to be opened. The code for the command button is...
Dim RetVal RetVal = Shell("explorer CurrentProject.Path & " \ " & Me.Location", vbNormalFocus)
When the button is pressed, I get an error - Type Mismatch
I am using the following code to view a picture of the relevent file in an image box in the record:
Me.imgEmployee.Picture = CurrentProject.Path & "\" & Me.Location & "\" & Me.Headshot
This code works fine. Also, if I hard code a file location into the first line of code, it also work fine:
Dim RetVal RetVal = Shell("explorer c:\employees\", vbNormalFocus)
This will open up the employees folder on the c: drive
Try
RetVal = Shell("explorer " & CurrentProject.Path & " \ " &
Me.Location",
vbNormalFocus)
Wayne Gillespie
Gosford NSW Australia
That's still slightly off. Should be:
Dim q As String
q = Chr(34)
RetVal = Shell("explorer " & q & CurrentProject.Path & " \ " & Me.Location &
q, vbNormalFocus) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eric Caron |
last post by:
Hi
Here's my problem, I create a windows service with Config.xml file.
All setup for my service is in this file. I create a windows
application to manage these settings (Config.XML File). This...
|
by: sjp |
last post by:
I need to open new windows only for the purpose of viewing linked
images, maybe a dozen or so throughout the site. Using the
Target="blank" command is quick, easy and seems like the best way to...
|
by: srik |
last post by:
Dear All,
I created a simple ASP.net web application on my desktop system, which
has Windows XP as the Operating system.
I then moved the ASP.net application to my server which has Windows...
|
by: mollyf |
last post by:
I just installed SQL Server 2005 on my PC (the developer's edition)
yesterday. I have some scripts written by one of my coworkers to
create some tables and stored procedures in a database that...
|
by: Jl_G_0 |
last post by:
Hey all. Got a weird problem here.
I need to open a folder that is on a server. The asp.net page and the
IIS are on the same server. But i Cant access it from nowhere but
locally. Simply because...
|
by: Raj |
last post by:
Following is a code to open a file & print its contents on screen. But
im getting the message "file can't be opened". The thing is, that if i
create a file separately in a particular folder in C...
|
by: pintu |
last post by:
Hi Friends,
I am creating one application in asp.net 2.0,c# and requirement is to
open a winform while starting window and call the webservice to update
some information entered in the form.Now my...
|
by: =?Utf-8?B?TGllbGE=?= |
last post by:
I have a user who stores her documents on a different drive and when she
attempts to open documents it auto defaults to My Documents instead of her
other drive. Is there a way to change the...
|
by: Rick |
last post by:
Can you help me figure out how i can open a windows folder from code?
I want a user to click a button to open a windows folder as you would when
you click on a folder in "My Computer".
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |