Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2006, 07:52 AM
Authorized User
 
Join Date: Dec 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to h@ckerz Send a message via Yahoo to h@ckerz
Default Excel to Access

hi,
 This is my first time in programming. i'm now trying to do a project using excel as my front-end and ms access as my database... i already make a connection between them but i want to set password on my database just to make secure the data on it.... the problem is my connection string has a problem, what is the right connection string that im going to use?

database name was : scoresheetDB.mdb
location: \\abolivar-desk\T1Files\Hackerz\My Intel Project\MS Scoresheet\ScoreSheetDB.mdb
password: hackerz



h@ckerz
__________________
................ h@ckerz ....................
If you can\'t join them.....HACK them
..................................................
 
Old December 18th, 2006, 08:32 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That's a problem. Normally people use Excel as a back end and Access as a front end, not the other way around.

The idea is that you never display datasheets to your users since they can mess with the data and violate business rules. If you are using Excel, why not just use Access for everything and use datasheet views of your data?

In any event, the way you pass a username and password to Jet is to use a Provider statement. Like this: I am not sure of the Jet Syntax because I use SQL mostly:

Connection.Open "Provider=Jet something;Data Source=Path to database;UID=Access Username;PWD=Access Password"

HTH

mmcdonal
 
Old December 18th, 2006, 10:26 AM
Authorized User
 
Join Date: Dec 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to h@ckerz Send a message via Yahoo to h@ckerz
Default

ControlPanel.Range("B14").Value contains the directory of the database
this is the connection string i create.
Con = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source= '" & ControlPanel.Range("B14").Value & "';" & _
      "UID=Admin;PWD=intel"


the problem error was " Could not find installable ISAM", what was that? can you help on this?

h@ckerz
 
Old December 18th, 2006, 10:32 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

From: http://support.microsoft.com/kb/209805

CAUSE
ISAM drivers are used by Access to update file formats other than its own. If the path of the ISAM driver in your Windows Registry is not valid, or if the ISAM driver does not exist, the problem may occur.

RESOLUTION
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To correct the problem, you can try to register the file manually or you must correct path name errors in the Windows Registry, and then install or replace the problem file. To do this, follow these steps.

Note In error message 1 that is mentioned in the "Symptoms" section, the file name is directly related to the attempted operation. In error message 2 that is mentioned in the "Symptoms" section, the file name is mentioned in the text of the message. 1. Locate the relevant file in the following table: File name Import/export ISAM for: Windows Registry
Msexcl40.dll Microsoft Excel HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Excel
Msexch40.dll Microsoft Exchange HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Exchange
Msrd2x40.dll Microsoft Jet 2.x HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Jet 2.x
Msrd3x40.dll Microsoft Jet 3.x HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Jet 3.x
Msltus40.dll Lotus 1-2-3 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Lotus
Mspbde40.dll Imprise Paradox HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Paradox
Mstext40.dll Text HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Text
Msxbde40.dll dBase HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Xbase

2. Use Microsoft Windows Explorer to search for the file.
3. If the file is found, record the path name for the file. If the file is not found, go to step 13.
4. Open the Windows Registry Editor.
5. Locate the registry subkey that is described in the table, and then check the path name against the actual path name. If the registry key does not exist, go to step 8.
6. Correct the path if it is incorrect. Continue these steps if the path is correct.
7. Close Registry Editor.

If you changed the path, repeat the process that produced the original error.
8. If the error persists, try to manually register the file by using the Regsvr32.exe utility.

The Regsvr32.exe utility is an application that is used to register DLLs and ActiveX Controls in the Windows Registry. You can use this file to stop the issue of mismatched .dll files. To re-register your .dll files by using the Regsvr32.exe utility, go to the next step.
9. Verify that the Regsvr32.exe file is in the system folder where Windows is installed.

For example, the Regsvr32.exe file is typically found in C:\Windows\System or in C:\Winnt\System32.
10. Click Start, and then click Run.
11. In the Run dialog box, type the following command in the Open box.

Note The path of Regsvr32.exe and the name and the path of the DLL may be different on your computer. The following command registers the Excel ISAM:

Regsvr32 c:\winnt\system32\msexcl40.dll

Note Another method of registering DLLs is to use Windows Explorer to find the DLL.

Double-click the DLL. In the Open With dialog box, click Regsvr32.exe, and then click OK.

This creates a permanent association of all DLLs with Regsvr32.exe. You can register other unregistered DLLs by double-clicking them.

For additional information about how to obtain this file, click the following article number to view the article in the Microsoft Knowledge Base:
267279 (http://support.microsoft.com/kb/267279/) Regsvr32.exe available in Download Center
12. If the error persists, or if the path name was correct in step 5, rename the file.
13. Start the Add/Remove Programs tool, start the Office 2000 Setup program, and then click Repair Office.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel to Access darkhalf Classic ASP Basics 6 June 18th, 2008 01:43 PM
Access and Excel help hewstone999 Access VBA 0 May 28th, 2008 05:26 AM
Excel via Access Vision G Access 2 June 1st, 2006 04:40 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.