Command Button

L

Lori

I am a fairly new user to access. I set up a command
button to open another form. Contact is the main form.
When the button is open and I input data into this form,
exit back to contact and move on to the next contact and
go into the form, it has the same information as I just
inputed for the first contact. Does anyone have a clue
as to what I might have set up wrong? I need for each new
contact when the button is clicked for a fresh screen to
open.
 
B

Byron

Lori,

First, take a look in the help file at the "OpenForm"
method. You will see that there are several options that
you can use when opening a form. One is the Data Mode
options. To open your second form to a new record, you
will need to use something like the code below:

DoCmd.OpenForm "Form2", , , , acFormAdd

(Just change the "Form2" to the name of your form)

HTH

Byron
 
R

Rick Brandt

Lori said:
I am a fairly new user to access. I set up a command
button to open another form. Contact is the main form.
When the button is open and I input data into this form,
exit back to contact and move on to the next contact and
go into the form, it has the same information as I just
inputed for the first contact. Does anyone have a clue
as to what I might have set up wrong? I need for each new
contact when the button is clicked for a fresh screen to
open.

Well, what is the code behind your button? If it just says "open this form",
then that is all it is going to do. If you want it to open to a specific
pre-existing record then you have to include that in the code.
 

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