Form to Form

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

Hello!
Im having some trouble with this, and i know its a simple
problem. If I have a command button on Form A that takes
me to Form B. How do I close out Form A when the command
button is hit? Im am currently getting a type mismatch
error. Thank you for your help.
 
Hi

in your command button click event at this line, before the line that opens Form B

DoCmd.Close acForm, Me.Nam
docmd.openform "form B


----- Stuart wrote: ----

Hello
Im having some trouble with this, and i know its a simple
problem. If I have a command button on Form A that takes
me to Form B. How do I close out Form A when the command
button is hit? Im am currently getting a type mismatch
error. Thank you for your help.
 
If you really want to close it,

docmd.Close ' No parametes will close the calling form
at the end of the OnClick Event

but me.Visible = False will simply hide it. That may be a better
option, depending on what yoou want to do
 
Greg

will it not close the 2nd form that you just opened if you put docmd.close (w/o parameters) at the end of the OnClick event

----- Greg Kraushaar wrote: ----

If you really want to close it

docmd.Close ' No parametes will close the calling for
at the end of the OnClick Even

but me.Visible = False will simply hide it. That may be a bette
option, depending on what yoou want to d

On Tue, 2 Dec 2003 09:40:52 -0800, "Stuart
 
Back
Top