Hello, All,
I’ve been tearing my hair out over this one. I have 2 forms, fForm1 and fForm2. At the OnCurrent event of fForm1, I create a little table called tCurrentId, which captures the current record’s Id number, which will be used to filter the records I want to appear in fForm2. Works fine going into fForm2, but when I click the “Back” button I created to return to fForm1, it’s giving me the dreaded Error 3211, “Table in use by other”. In fForm2’s click event for the Back button, I’ve tried all if these:
DoCmd.Close acTable, "tCurrentID"
Trying to unlock by simply closing the table – error occurs in fForm1’s OnCurrent event.
DoCmd.Close acQuery, "qSelectCurrGrades"
Trying to unlock by closing the record source for fForm2, which uses tCurrentId table – error occurs again in fForm1
DoCmd.Close acForm, "fForm2"
Trying to unlock by closing the form, which I thought would release the table – Again, error in fForm1
Call CurrentDb.TableDefs.Delete("tCurrentId")
Trying to unlock by deleting the table, which triggers the 3211 error on this line
Me.RecordSource = ""
Trying another way to unlock by closing the record source. This line takes me back to the Load event of the current form, which then blows up because there’s no record source(!)
I’ve seen many threads on the web, but have not seen much that is useful. In one case it was suggested that a recordset was opened somewhere, but not closed. I’m certainly not doing that in my code, so, if that’s being done, it’s behind the scenes. I would appreciate it if someone could please tell me how to unlock this table. Please give me examples of syntax, being as specific or explicit as you can.
Thank you so much!