G
Guest
Ted,
You need to open a recordset based on the table you're writing to. Then add
a new record and then update the database.
I'm using DAO for my data access. Assuming that you have created the table
and the FE is linked to the BE table:
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM reportlog")
' Get ready to create a new record in the reportlog table.
rst.AddNew
' I made up some plausible column names for the reportlog table.
rst![User] = CurrentUser
rst![Date] = Now
rst!
= Me.RecordSource
' Now, write the record to the actual table.
rst.Update
' Clean up.
Set rst = Nothing
That should be close to the needed code to accomplish this task.
Greg
You need to open a recordset based on the table you're writing to. Then add
a new record and then update the database.
I'm using DAO for my data access. Assuming that you have created the table
and the FE is linked to the BE table:
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM reportlog")
' Get ready to create a new record in the reportlog table.
rst.AddNew
' I made up some plausible column names for the reportlog table.
rst![User] = CurrentUser
rst![Date] = Now
rst!
' Now, write the record to the actual table.
rst.Update
' Clean up.
Set rst = Nothing
That should be close to the needed code to accomplish this task.
Greg