By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

access question / forms

P: n/a
Hi,

I would like to have a command button on Form 1 that opens another form
(Form 2), then closes Form 1.

I tried the DoCmd.close after the open form code but it closes the form its
trying to open.

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Nick J wrote:
Hi,

I would like to have a command button on Form 1 that opens another
form (Form 2), then closes Form 1.

I tried the DoCmd.close after the open form code but it closes the
form its trying to open.


Either close Form1 first (the other lines of code will still execute) or
explicitly name the form you want to close in the DoCmd.Close method. By
default it closes the currently "active" object, but you can specify which
object to close.

DoCmd.Close acForm "FormName"

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
On Tue, 12 Apr 2005 13:50:44 GMT, Nick J wrote:
Hi,

I would like to have a command button on Form 1 that opens another form
(Form 2), then closes Form 1.

I tried the DoCmd.close after the open form code but it closes the form its
trying to open.

DoCmd.OpenForm "Form2"
DoCmd.Close acForm, Me.Name
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
Thank You.

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
"fredg" <fg******@example.invalid> wrote in message
news:1p****************************@40tude.net...
On Tue, 12 Apr 2005 13:50:44 GMT, Nick J wrote:
Hi,

I would like to have a command button on Form 1 that opens another form
(Form 2), then closes Form 1.

I tried the DoCmd.close after the open form code but it closes the form
its
trying to open.

DoCmd.OpenForm "Form2"
DoCmd.Close acForm, Me.Name
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.