I have a form which I want to run an append query if records exists in a temp table.
I saw some code in another database and I trimmed it up to the following, however I"m not certainif I'm on the right track here. I can't use the ADODB statement in my version of Access 2010 as it doesn't exists.
Can someone advise me the best way to see if records do exists in a table and perhaps pass a True or False variable or soemother indicator?
Public Function chk_table()
Dim rs As ADODB.Recordset
Dim stSQL As String
stSQL = "select * from " & mytable
Set rs = New ADODB.Recordset
rs.Open stSQL, Application.CodeProject.Connection, adOpenStatic, adLockOptimistic
If (rs.RecordCount = 0) Then