From: babs on
I have added the code below to the on click event of a command button
I want the form to be closed because when I navigate to a new form this form
is a subform on the mainform(not linked) just a list but I have to refresh
form manually

DoCmd.Close acForm, "[JeffJobsToBEATqry Form]"

thought when use the above code - the current form jeffjobstobeatqry form
should CLOSE(not see on taskbar) and then when Main form opens it will Reopen
and refresh???

why is the form still showing up on taskbar(doesn't seem to be closing with
the above code)??
Thanks,
Barb

From: Rob Parker on
Hi Barb,

Does your form have the [ ] as partof its name? If not, remove them - the
quoted string needs to contain the form's exact name.

HTH,

Rob


"babs" <babs(a)discussions.microsoft.com> wrote in message
news:E8E17A53-89F9-4324-A3DC-2941944F4A44(a)microsoft.com...
>I have added the code below to the on click event of a command button
> I want the form to be closed because when I navigate to a new form this
> form
> is a subform on the mainform(not linked) just a list but I have to refresh
> form manually
>
> DoCmd.Close acForm, "[JeffJobsToBEATqry Form]"
>
> thought when use the above code - the current form jeffjobstobeatqry form
> should CLOSE(not see on taskbar) and then when Main form opens it will
> Reopen
> and refresh???
>
> why is the form still showing up on taskbar(doesn't seem to be closing
> with
> the above code)??
> Thanks,
> Barb
>