Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't find "tblCustomers" as mde, works fine as mdb 1

Status
Not open for further replies.

jgpasko

Programmer
Dec 6, 2001
48
US
Access 2000, MS Jet 4.0(sp6), Client Server config. db is on NT 4.0 Server, Workstations are Win 2k(sp3). I have a problem that has managed to confound me. I have a Function that populates data from tblCustomers into frmSOEntry. It compiles and fires without defect in .mdb. However, when I compile and make it .mde and call it through a Menu that uses ctlTreeView and ctlListView, it gives me an error that it can't find "tblCustomers". Here is the code snippet:

*************************************************
Function PopulateCustomers(lngCustID As Long)
On Error Goto PopCust_ERR

Dim strSQL As String
Dim rst As ADODB.Recordset
Dim conn As ADODB.Connection
Set rst = New ADODB.Recordset
Set conn = CurrentProject.Connection

strSQL = "Select * From tblCustomers Where CustomerID=" & lngCustID

rst.Open strSQL, conn, adOpenStatic, adLockReadOnly 'Fails Here
***********************************************************
I have also tried this using DAO with the same results. I created a Registry Function to call the database by reference, and it seems to remedy it, but I get an the same error when firing compiled queries as Recordsets.

Any suggestions?

Thanks in advance.

John John Pasko
john@rts-sd.com
"No matter where you go, there you are."
 
Did you check your Security tab of the MDE file's Properties to make sure the flag is checked to "Allow inheritable permissions from parent to propagate to this object"?

That's always been my issue when I'm working with front-end / back-end databases.

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"No need to send gifts, just send a smile."
 
Thanks Roy. John Pasko
john@rts-sd.com
"No matter where you go, there you are."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top