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."
*************************************************
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."