Background:
I have a subform (datasheet) I update using a datasheet checkbox afterupdate event:
- I clone the clicked record & Insert into the referenced table via an Insert Query
- I modify the original record to differentiate from the Inserted record via an Update Query
To avoid RecordLock complaints, I have inserted: SendKeys "+{Enter}", True
after each of the above to save the updates - is there a better way to do this??
Next I need to requery the subform to display the newly inserted record AND use a bookmark (?) to retain the cursor position of the original record (inserted record will be adjacent). Subform datasheet recordset is based on a query.
Question:
From within the subform's afterupdate event, using
Forms![ParentForm].[SubForm].Form.Requery
does not produce an error, but does open the code window with the line highlighted in Yellow.Next attempt, from within the subform's afterupdate event, I have attempted to set focus to a control on the ParentForm BEFORE using
Forms![ParentForm].[SubForm].Form.Requery
, but I get a similar ~silent error~ as noted above.What is the proper way to REQUERY a subform from within the same subform?
Thanks!