G
Guest
Hello,
I would like to know how tomodify the following code so that instead of writing to the specified table in the current database it would write the information to an external database c:\delete.mdb containing a table of the same name. I want tomove the table so that is not included as part of the main database.
**********
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
On Error GoTo Deal_Error:
Dim User As String, Table As String, Record As String, Dwg As String, Issue As String
Dim When As Date
User = CurrentUser()
When = Date
Record = Me.Id
Dwg = Me.Drawing_Number
Issue = Me.Issue
Table = "Drawing History Tbl"
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("CoordMemo Tbl")
rst.AddNew
rst("Who") = User
rst("When") = When
rst("Table") = Table
rst("Record") = Record
rst("Dwg") = Dwg
rst("Issue") = Issue
rst.Update
rst.Close
Exit_Error:
Exit Sub
Deal_Error:
GoTo Exit_Error
End Sub
***************
Thank you as always,
Daniel
I would like to know how tomodify the following code so that instead of writing to the specified table in the current database it would write the information to an external database c:\delete.mdb containing a table of the same name. I want tomove the table so that is not included as part of the main database.
**********
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
On Error GoTo Deal_Error:
Dim User As String, Table As String, Record As String, Dwg As String, Issue As String
Dim When As Date
User = CurrentUser()
When = Date
Record = Me.Id
Dwg = Me.Drawing_Number
Issue = Me.Issue
Table = "Drawing History Tbl"
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("CoordMemo Tbl")
rst.AddNew
rst("Who") = User
rst("When") = When
rst("Table") = Table
rst("Record") = Record
rst("Dwg") = Dwg
rst("Issue") = Issue
rst.Update
rst.Close
Exit_Error:
Exit Sub
Deal_Error:
GoTo Exit_Error
End Sub
***************
Thank you as always,
Daniel