473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems running an Access dbase on Parallel Desktop for Mac

Hello, I have developed and tested an Access database that I now wish to distribute. It works well on all computers tested, including an Apple Mac running Parallels Desktop, but with one exception. When using the Mac, on the command to open an existing PDF it fails to deliver, with no error message. The VBA I am using to do this is as follows:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_DblClick(Cancel As Integer)
  2. On Error GoTo 10
  3. Dim strFile As String
  4. Dim lngErr As Long  
  5. strFile = "C:\Wheelbase\Invoices\" & Me!Account & "-" & Me![Inv No] & ".pdf" 
  6. lngErr = ShellExecute(0, "OPEN", strFile, "", "", 0) 
  7. 10
  8. End Sub
  9.  
and

Expand|Select|Wrap|Line Numbers
  1. Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
  2. ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
  3. ByVal lpParameters As String, ByVal lpDirectory As String, ByVal ShowCmd As Long) As Long
  4.  
It works fine with Windows. Is there a compatibility problem with 'Parallels' on the Mac?

Thanks
Nick
Jul 18 '12 #1
12 26453
zmbd
5,501 Expert Mod 4TB
Which version of Access are you running on the Mac?
Which version of the emulation OS are you running on the Mac?
-z
Jul 18 '12 #2
The Mac is running Access 2007 and it is using Version 7 of the Parallels Desktop OS.
Nick
Aug 5 '12 #3
zmbd
5,501 Expert Mod 4TB
Sorry to take so long to get back to you.
The family was on vacation and I'm only just now really getting things back on track... work tomorrow and more things to get back in order there :)

HOWEVER!

Talked with a Mac friend... he mentions that sometimes the file associations can be bodged in Parrallels and is the very first thing to check... easy enough:
Can you open other pdf files directly in Acrobat on the Mac in question?

If so then try modifing line 6 as I believe that you are telling the application to hide the window upon open:
Expand|Select|Wrap|Line Numbers
  1. ShellExecute(0, "OPEN", strFile, "", "", 3)
( http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx )

If you can not open pdfs directly then you'll need to resolve that issue first and that is well outside of this thread; there are however some really good Mac forums that should help in this case.

-z
Aug 5 '12 #4
Thanks for that and no probs about the delay. Yes, PDFs do open from Windows Explorer, but not when accessed via the ShellExecute command from within Access. Sadly that is still the case when I replace the 0 by a 3 in the 6th line of code, as suggested. I confess to not being an expert on the coding, having pasted it in from a previous interchange with 'Bytes', but it has worked flawlessly for 2 years now, on a number of XP and Windows7 OS computers. Any other thoughts please?
Nick
Aug 6 '12 #5
zmbd
5,501 Expert Mod 4TB
Haven't missed you... just back from vacation and lots to catch up on.
I'll ask my Mac friends about this... may take a tad to get an answer back as they live way across the country.
-z
Aug 6 '12 #6
zmbd
5,501 Expert Mod 4TB
Well that was fast....
My buddy says that you should start at the beginning of this thread to get a background on the issue, and of note is post #130 on page 7... I think he deals with this alot:
http://forum.parallels.com/showthrea...t=14254&page=7
SO, it appears that this may be a VM issue which is so beyond what I can help you with ( honestly... I don't know enough about the parallels environment to be much if any help if the issue lies there-within )
-z
Aug 6 '12 #7
Well I guess that makes two of us! Post #123 in your link seems to offer a solution which I might try, but you can't really distribute a database along with some complicated instructions to make it work properly on some machines. It looks like I will have to reduce the functionality to ensure compatibility across the board. Shame.
Thanks for your guidance!
Nick
Aug 7 '12 #8
Maybe there is another way I can get round this problem. The reason for the above code was to ensure that a PDF could be created without having to bother about the Adobe version number being updated. Originally I used the following code, but it was messy as it would require the user to update the path every time the version changed:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_DblClick(Cancel As Integer)
  2. Dim strProg As String
  3. Dim strFile As String
  4. strProg = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
  5. strFile = "C:\Wheelbase\Invoices\" & Me!Account & "-" & Me![Inv No] & ".pdf"
  6. Call Shell(strProg & " " & strFile, vbMaximizedFocus)
  7. End Sub
  8.  
Is it possible to use a wildcard in the \Reader 10.0\ directory so it would be independent of whatever version number was running? I have tried using stars '*' but to no avail.
Fingers crossed!
Nick
Aug 8 '12 #9
zmbd
5,501 Expert Mod 4TB
I don't think that you can use the wild-card.

As far as I know, from the code you've posted, you will have to determine which version is installed and then build the string.

This will be a tad out of my normal as once again I don't know how your VM works.

I would suggest going back to the forum in the link I posted in #7 and posting the question there too... someone with more Mac/Paralles may very well have this solved on their site.

-z
Aug 8 '12 #10
Sorry Z, I didn't make myself clear. My last question didn't relate to the Mac/Parallels problem. The code I just sent works fine on MS or Mac/Parallels computers and using it gets me round the previously discussed compatibility issue. It's just that I need to make strProg resilient to changes in the Adobe version number in the 3rd directory.

However, from what you've said, it seems this can't be done by using a 'wild card' in the stricg so it's back to the drawing board I fear!
Thanks
Nick
Aug 8 '12 #11
Hi Z, As a postscript to the above, in the absence of the ability to use wild-cards in directory strings, I have found a solution that does not need to use the ShellExecute command and is therefore resilient to the Mac/Parallels problem, but also handles older Adobe versions as well as future updates.
There are three variables along the path to the executable:
'Program Files' with or without the subscript (x86)
'Acrobat' or 'Reader'
and then the Version Number that follows that.
The VBA routine keeps trying all of these, including version numbers from 00.0 to 99.0 until the error trapping lets it through. It then saves that route on the database to speed up the routine for next time. On version upgrade it will get an error and just go through the process again. Sledgehammer to crack an annoying nut but it works! Happy to pass on the code if anyone else is interested.
Cheers
Nick
Aug 25 '12 #12
zmbd
5,501 Expert Mod 4TB
I'm wondering if something like the following would be usefull... http://www.ammara.com/access_image_f...er_search.html
I've been playing with it, using various paths and wildcards and it might be possible to modify the results.

-z
Aug 27 '12 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
3
by: Wayne Aprato | last post by:
Can anyone shed any light on the following problem which has shown itself in a couple of my Access 97 databases. When I ask Access to open a form that is based on a query, it will randomly fall...
2
by: Jim Pettway | last post by:
I am trying to run MS Access 97 on Windows ME and it continuously crashes (will not read Access data and then Windows locks up). The program runs fine on Windows 95 and Windows XP. Somewhere I...
7
by: Rob | last post by:
I am an Access developer and have done many Access databases in the standard Front-end on the workstations, backend on the server (over a LAN) but have never worked with Access over Citrix, though...
1
by: Jesper | last post by:
Hi, I am experiencing some problems running a .net exe placed on a network drive. File IO operations and access to reg db results in access denied exceptions. If I run the same program from a...
4
by: louise raisbeck | last post by:
Hi I know I may be repeating some past questions but i wasnt sure if i added on to these if they would appear in the 'new list'! I have IIS 5 installed, IE 6 and visual studio .net 2003. When i...
1
by: loreille | last post by:
To insert a record in a Ms Access database and be able to retrieve the newly created ID (autonumber) I used the code below (code 1). Now, the problem is that this is not very secure and that, if...
3
by: yxq | last post by:
Hello, The XP Desktop clean wizard can get the last access time of desktop shortcut, i found that the info come from ...
0
by: RocketBot | last post by:
Hi I am having problems running a site localy using the IIS server. Running pages normally is fine, but when I use a master page the VB Controls do not work. For example a button on the page...
2
by: chiefsitebuilder | last post by:
I have a question about saving an MS Access program to CD and verifyng that the program works after being saved. Here is my situation, I have a person who developed an application for me using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.