I have build a database that will track problem reports for a product that we build. I have a Frontend in Access and my Backend in MySQL. I have registered the a DSN through code using Dbengine.

e.g.
Public Sub makeDSN()
Dim attribs As String

attribs = "Description=MySQL pcr databse" & Chr$(13)
attribs = attribs & "OemToAnsi=No" & Chr$(13)
attribs = attribs & "Server=C172204" & Chr$(13)
attribs = attribs & "network=esic17" & Chr$(13)
attribs = attribs & "Address=\C172204\mysql\data\pcr" & Chr$(13)
attribs = attribs & "Database=pcr"

DBEngine.RegisterDatabase "pcr", "MySQL ODBC 3.51 Driver", True, attribs
End Sub


***I'm linking the tables using Database and Tabledefs objects.

e.g.
Public Function link_table(ByVal tblName As String)
Dim count As Integer
Dim sConnString As String
Dim uid As String
'more new code
Dim currentDatabase As Database
Dim myTableDef As TableDef

Set currentDatabase = DBEngine.Workspaces(0).OpenDatabase("\\Esi-sum-program\c-17 edl\Databases\PCR\MySQL_PCR6-29-04-conn.mdb")

On Error GoTo err
'A loop to insert the table, loops up to 3 times if it fails
Do While (Not (check_table(tblName) Or count >= 3))
'Debug.Print sConnString
'new code below

Set myTableDef = currentDatabase.CreateTableDef(tblName)
myTableDef.Connect = "odbc;DATABASE=pcr;UID=" & uid & ";PWD=" & Module1.mypwd & ";DSN=pcr"
myTableDef.SourceTableName = tblName
currentDatabase.TableDefs.Append myTableDef
count = count + 1
Loop
End Function

***I have been having a problem where the linked tables do not get refreshed. I can add several new records from the frontend and it will work fine. Then for instance I can add a few more records and they will not appear in the list of current records. I have search msdn for similar problems but have found none. If anyone has any helpful insight it would be much appriciated.

Thanks,

Animaul