how do I clear the content of a screen before displaying new data by running requery ?

F

freakazeud

Hi,
I'm not sure if I'm understanding your request.
How would requery clear anything of a screen? It just requeries an
underlying datasource if it changed, so unless the datasource of your form
changed to null values it won't clear anything.
If this is a bound form you can just move to a new record. If this is an
unbound form then you need to set each unbound control's value to Null...you
can do that with a loop if you want.
HTH
Good luck
 
J

John Spencer

Can you explain a little more what you want to do and why you want to do it?

If you have a form and you want to clear the contents of the form before you
requery the form, then you can hide the form or set its record source to nothing
or ...

I really don't understand what you mean by clear the content of the screen. Do
you want to close all open forms, close open queries, leave the form or query
open with no records, or ????

It makes little sense to me to clear the contents of a form and then requery the source.

Rani wrote:
 
R

Rani

ok then let me elaborate :
I crated a form based on a query.
in the form - a continues form - I display the information pretends to a
salesman according to his activities per month.
the form as an unbound combobox based on the salesperson name from the
query. I declared an afterupdate event in which I run the requery
(me.requery)
I have few issues with this form:
1. if I don't select a default salesperson name - the form will load empty,
and will not let me do anything.
2. if I define a default name, the form will let me choose different
salesperson, but the appropriate data will not change meaning if I selected
a sales person with 8 different type of activities, it will display all 8 of
them but then when I select a sales person with 4 type of activities the
system will replace the data with the appropriate lines but will live the
remaining activities on the screen

what do I do ?
 
Top