closing a pop up form2

  • Thread starter Thread starter RayNDM83
  • Start date Start date
R

RayNDM83

Hi,
Is there a way after a button on form2 is clicked, this form2 will close by
itself. The button on form2 that was click musst first filter (already) an
open form1 before closing form2.
Thanks in advace.
Raymund
 
Where ever you have the code to filter form 1, follow it with

Docmd.Close acForm, Me.Name
 
I created the codes in the macro objects. Where Action is to 'OpenForm', Form
Name: 'Form1", View: 'Form', Filter Name: blank, Where Condition:
[field1]="aa" or [field2]="bb" and window mode: Normal
 
Thank you for taking time to response. When I tried this the first time,
somehow I did something wrong that it didn't work. I tried it again adding
"close" to the action, type the object type and object name to be close and
it worked.

RayNDM83 said:
I created the codes in the macro objects. Where Action is to 'OpenForm', Form
Name: 'Form1", View: 'Form', Filter Name: blank, Where Condition:
[field1]="aa" or [field2]="bb" and window mode: Normal

Klatuu said:
Where ever you have the code to filter form 1, follow it with

Docmd.Close acForm, Me.Name
 
Back
Top