Connection problem ?

  • Thread starter Thread starter Werner Sölken
  • Start date Start date
W

Werner Sölken

Hello,

on drive s:\ is a Access Db with only tables
on drive n:\ is a Access Db with forms, modules reports etc.

from drive n:\ I edit de tables on drive s:\

when I open the Db on drive n:\ , for nobody it is possible to do edit
records in the tables on drive s:\

the Db is Access 2003, Windows XP

What do I wrong ??

Werner
 
You have to link the tables FROM the Db on drive s:\ TO the Db on drive n:\.

Open the Db on drive n:\ and choose "Get External Data => Link Tables" from
the file menu.

Then you'll be able to edit the data in the tables in drive s:\ from the Db
on drive n:\

Frank
 
Frank...thanks for your reply

On this moment for me it is not possible to try out your solution, the Db is
on my company server.

I edit the tables with Ado...see below
Normally I work with VB6 and put the data to Access tables, no link is
necessary.

I wil try to explain the problem:
Everyone from more then 100 users can open de Db on drive n:\ .
Everyone can reach the menu ("Switchboard").
The menu has some Buttons to go further.
When a user click one of the buttons nothing happens.
When a user is the first, then he can further.

Procedures after a button, for example, is to open another form, set de
recordset for a subform (tables on drive s:\) etc. etc.


Sub openConn()
Set Conn = New ADODB.Connection
strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& S:\MOC\MOC.mdb;Jet OLEDB:Database Password=hello;"
Conn.Open strConn
End Sub

Sub RsWrite()
Set dbCmd = New ADODB.Command
dbCmd.CommandText = strSelect
Set dbCmd.ActiveConnection = Conn
Set Rs = New ADODB.Recordset
Set Rs.Source = dbCmd
Rs.CursorType = adOpenKeyset
Rs.LockType = adLockBatchOptimistic
If Rs.State = adStateOpen Then
Rs.Close
Set Rs = Nothing
End If
Rs.Open
End Sub

Sub RsRead()
Set dbCmd = New ADODB.Command
dbCmd.CommandText = strSelect
Set dbCmd.ActiveConnection = Conn
Set Rs = New ADODB.Recordset
Set Rs.Source = dbCmd
Rs.CursorType = adOpenKeyset
Rs.LockType = adLockReadOnly
If Rs.State = adStateOpen Then
Rs.Close
Set Rs = Nothing
End If
Rs.Open
End Sub

Thanks...Werner
 
Frank,
Indeed, linking the tables is the solution...or the "IN" operator from SQL.

Select table from Db IN 'S:\...\..' where etc.

Thanks
 
Back
Top