I'm having a bit of an issue with timing, I think, that's driving me batty!
- I have a Form with a subform with a Table as recordsource (as a datasheet)
- Users can edit the data in the datasheet
- Upon closing the form (via btnSave), I intend to run a function that exports the datasheet, with its changes to an XLS via Transfer spreadsheet.
- Access is complaining the table is "already in use"
- I have attempted to set the subform's recordsource = "" then requery
- Same complaint from Access about the table - but table is not open!
Any suggestions how and where to attach the export function?
Note: The export function works just fine under its own dedicated button on the MainForm. I just want to run this same function when I close the form/subform.
Source Object
property to""
? – HansUpSource Object
property. You would need something likeNameOfSubformCONTROL.SourceObject = vbNullString
In other words, there should not be any.Form.
in there at all because a form does not have aSource Object
property --- it has aRecord Source
. – HansUp