ACCESS 2007 Runtime Security Problem

I have an ACCESS Form that I have packaged as a RunTime and it works perfectly on the computer where it was created.  This computer has Office 2007 Pro.  When I install the package that includes the runtime files on computer with Office 2003 Pro it opens with a security warning that I would like to get rid of, but more importantly the program crashes when it tries to export a set of tables to an /mdb file.  See the code below.   I suspect there might be a write permission thing going on.

Thanks,
Pat
Private Sub cmdExportMDB_Click()
'This refresh is necessary since the refresh rate is the frequency of saving changes back to the table.
'The default refresh rate can be set by the user but the default value is 60 seconds so if the data are
'copies to a file less than 60 seconds after a change, the change does not occur in the output file.
Me.Refresh
Dim db As DAO.Database
'create a string variable to use as a test for the presence of the WF87Link.mdb file
Dim TestLinkFile As String
'If the file exists, DIR will return the file name, if not it will be a blank string
TestLinkFile = Dir("C:\WetForm\WF87Link.mdb")
'This tests for the existence of the file, if the file doesn't exist then it is created.
If TestLinkFile = " " Then
Set db = CreateDatabase("C:\WetForm\WF87Link.mdb", dbLangGeneral, dbVersion40)
db.Close
Set db = Nothing
End If

Open in new window

phmurphyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

phmurphyAuthor Commented:
Perhaps it isn't a write permission issue because I can export a table as a spreadsheet without a problem.  The actual error is "Execution of this application has stopped due to a run-time error - The application can't continue and will be shut down".  This does not happen on the desktop where the runtime was created.

Thanks,
Pat
0
phmurphyAuthor Commented:
I have now run the database (by opening it on the other computers after changing the extension to .mdb) and the program fails because the target file wasn't created.  Is there some reason that the createdatabase would work on one machine but not the others?

Thanks,
Pat
0
phmurphyAuthor Commented:
HI all,
I am narrowing the problem down.  It must have something to do with the if statement, because if I remove the if statement the target file is created just fine.  The problem is the if statement.  But exactly what the problem is I don't know.

Thanks,
Pat
0
phmurphyAuthor Commented:
OK, so I solved one problem but now I am back at the first issue of the Security warning.  The if statement needed to be "" not " ".  That darn little space caused the logic problem.  The problem now is that when I get past that, there is a warning message for each of  10 tables that are passed to the external database.  I already have the SetWarnings = False but that doesn't seem to help.
Is there anything I can do in the program to fix this?
Is there a way for a user on another machine to set their security settings so this doesn't happen?

Thanks,
Pat
DoCmd.SetWarnings False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "WetForm", "WetForm", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "WetForm2", "WetForm2", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "SpeciesLookup", "SpeciesLookup", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "SoilInfo", "SoilInfo", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "State_County", "State_County", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "VegRemark", "VegRemark", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "SoilRemark", "SoilRemark", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "SprintDB_SysTable", "SprintDB_SysTable", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "PhotoLocations", "PhotoLocations", False
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\WetForm\WF87Link.mdb", acTable, "HydRemark", "HydRemark", False
DoCmd.SetWarnings True

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.