Why is it that the code isn't completing before the clearing code runs?
When you use Access, it's common to pass program execution to different services. Memory's a bit fuzzy on the exact details, but there's Jet and the Expression service to name a couple. Code execution can invoke a process on one side while execution continues in the other. Rather than attempt to slow execution down (which is easy enough) you should probably alter the user interaction, such as
- require a command button click to do what you're attempting to delay, assuming a second or two is all that's needed
- alter the form so as to move to a new record (which would automatically clear the controls)
- any other similar delaying tactic
Forgive me if I repeat something already mentioned (I gleaned over all the responses) but please use code tags for more than just a few lines, and proper indentation to make code easier to read. On the code side, because of the way you declared these all on the same line, all of the following are Variant data types
Dim MsgSave, StyleSave, TitleSave, ResponseSave
Don't know if you're aware of that - looks odd because most people explicitly define variable types rather than default to Variant, which is one of the largest uses of computer memory. Most of the time, all declarations are done in the same block near the top.
I guess the rest of the code that you haven't shown takes care of closing and destroying of the rs object (also good practice). Not sure if you understand the difference between "" and Null. Many would test a control for Null when they've set it to "" somewhere else. That test should report False.