B
bismuth83
I have a form that has a subform which points to a saved query in
datasheet view. Prior to opening this form, I reset the SQL of the
query using a querydef, so that the subform fields end up being
dynamic. This all works fine unless I try resizing the column widths
in the datasheet. Then, when I close the form, I get prompted to save
the query. If I click Yes or Cancel, when I reopen the form, I get a
"The search key was not found in any record" error. The error goes
away after I delete and recreate the saved query, but comes back if
the process is repeated.
I've tried using a command button to close the form, using
"DoCmd.Close acForm, Me.Name, acSaveNo," but I still get prompted to
save the query. Also tried using "DoCmd.SetWarnings False" to avoid
the prompt altogether, which works, but it auto saves the form when
the column sizes are changed, and gives me an error.
datasheet view. Prior to opening this form, I reset the SQL of the
query using a querydef, so that the subform fields end up being
dynamic. This all works fine unless I try resizing the column widths
in the datasheet. Then, when I close the form, I get prompted to save
the query. If I click Yes or Cancel, when I reopen the form, I get a
"The search key was not found in any record" error. The error goes
away after I delete and recreate the saved query, but comes back if
the process is repeated.
I've tried using a command button to close the form, using
"DoCmd.Close acForm, Me.Name, acSaveNo," but I still get prompted to
save the query. Also tried using "DoCmd.SetWarnings False" to avoid
the prompt altogether, which works, but it auto saves the form when
the column sizes are changed, and gives me an error.