Clearing controls problem

  • Thread starter Thread starter RJ
  • Start date Start date
R

RJ

I have an inquiry screen with multiple unbound selection criteria controls in
the form header section. The usual stuff - nothing exotic. Once the user
clicks on the Search button, the record source is set to a Exec the SP
passing the variables from the controls. There is also a "refresh" button
that clears (nulls) all the selection controls described above.

If the sp found matching records, they are displayed, and if the user clicks
on the Refresh button, all the controls are cleared and ready for the next
search. As expected.

However if the SP found no records, and the user clicks on refresh, the
controls are not VISIBLY cleared! The strange part is the controls are
blanked out as you tab through them. I tried a repaint but that proved
useless. Through debug.print I can see that the routine is being executed
and the control values are being cleared however the old value remain visible
in the form! I have several other forms that are similar in nature but the
one descibed is the only one having the clearing problem.

Any ideas,
Your help is much appreciated!

RJ
 
If anyone has the same problem.....

As soon as the sp returned an empty recordset, I set the the RecordSource
back to an emptystring and the controls worked (cleared) as normal.
 
Back
Top