I have some code that is giving me this error whenever I try to run it:
"Run-time error '3078': The Microsoft Access database engine cannot find the input table or query". Make sure it exists and that its name is spelled correctly."
I have checked the table it references and the name is correct.
Is there something wrong in the code I have written?
Private Sub btn_AddtoTeam_Click()
Dim db As DAO.Database
Dim rst As Recordset
Dim strsql As String
Dim TNAME As String
Set db = CurrentDb
Set rst = db.OpenRecordset(strsql)
strsql = "Select Top 1 * from Team"
TNAME = Forms!frm_Staff!FName & " " & Forms!frm_Staff!Lname
rst!TEAMName = TNAME
Set rst = Nothing
Set db = Nothing