Hi there. I need to just insert a new record into my table. I don't want the system to retrieve all records that currently exist in this table because it's pretty big. But I think that's what my code is doing right now - actually, it was a freebee code snippet that I got from another forum to log all changes made to a form / record in ms access. Can I pass a select statement that doesn't return anything, just to get the recordset set up? How would I do this?
The code looks like this:
Public Function basAddHist(Hist As String, frm As Form, MyKeyName As String, MyCtrl As Control, uid as string)
Dim dbs As DAO.Database
Dim tblHistTable As DAO.Recordset
Set dbs = CurrentDb
Set tblHistTable = dbs.OpenRecordset(Hist, dbOpenDynaset)
This is what I'm doing and it seems to work... although if someone can verify that I'm not doing anything "bad", that'd be great,
Set tblHistTable = dbs.OpenRecordset("Select * from tblhist where dtchg=1/15/1975;", dbOpenDynaset)
There will never be any records with this timestamp...
It seems to work although the whole point of this change was to speed things up and I can't tell if that's happended because I'm connected via remote desktop and everything seems to be running slow today!