Command Button

G

Gina

I am having trouble creating a form inside of a form. What I am trying to do
is have a form and have command buttons on that screen. When you click on one
of the buttons it takes you to another form. But I have having trouble
getting what I want on the command button. How do I get my button to open
another form and not a table? Please help me.
 
S

Steve

Put the following code in the Click event of the button:
DoCmd.OpenForm "NameOfForm"

Note: quotes are needed!!

Steve
(e-mail address removed)
 
L

Larry Linson

Gina said:
I am having trouble creating a form inside of a form. What I am trying to
do
is have a form and have command buttons on that screen. When you click on
one
of the buttons it takes you to another form. But I have having trouble
getting what I want on the command button. How do I get my button to open
another form and not a table? Please help me.

What version of Access are you using? Do you have the Command Wizard active
(it's the little 'magic want' button on the toolbox)? A Command Button does
not, by default, open a table, so you need to tell us what you are doing
that leads to that action. With the Control Wizard operational, you'll be
led to a screen on which you can choose Form actions, one of which is
"Open".

If you are using Access 2007, the "code behind the Form" that is generated
will be a macro, and someone else would have to assist you with your
problem.

In Access 2003 or earlier (at least back to Access 2.0), you will need to
have the other Form already defined, and you'll be prompted to enter its
name. If there is a Filter or Where Condition you want applied (to limit
the subset of Records from the Form's Record Source that you want
displayed), you will need to make small modifications to the VBA that is
generated as "code behind the Form".

Larry Linson
Microsoft Office Access MVP
 
C

Caro

Gina said:
I am having trouble creating a form inside of a form. What I am trying to
do
is have a form and have command buttons on that screen. When you click on
one
of the buttons it takes you to another form. But I have having trouble
getting what I want on the command button. How do I get my button to open
another form and not a table? Please help me





IL EST VRAI QUE POUR APPRENDRE L'ANGLAIS , C' PARFAIT MAIS TECHNIQUE;

VOUS NE PARLEZ JAMAIS FRANCAIS ,,,,,,,,,,,,,,,,,,,,,,,,

JE TROUVERAIS CELA PLUS CORRECT ET MOINS IMPERSONNEL

MERCI POUR VOTRE COLLABORATION
 
I

inesv

Oui mais si tu ne sais pas parlez français ,????


Le 22/03/10 9:54, dans (e-mail address removed), « Caro »
 
B

Bruno Frisque

Re: DEMANDE DE TRANSMISSION EN FRANCAISSee 'microsoft.public.fr.access'

Aussi simple que ça ...
Best regards
Bruno


Oui mais si tu ne sais pas parlez français ,????


Le 22/03/10 9:54, dans (e-mail address removed), « Caro »
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top