Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Macro Button to add new info


Message #1 by "Rick N" <loonievisa@h...> on Wed, 21 Aug 2002 16:17:18 -0600
I've created a form called "New Entry." In here, the person need to input 
new names when required.

When the person input the name and click on the "Enter" button, I would like 
the button to add the new entry into the table called tbl_name.

I chose/created the button (command button) in the toolbox in design view of 
the form.


Big hugs of thank you!


Rick


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Message #2 by "Steven White" <Steve.White@m...> on Thu, 22 Aug 2002 01:13:54
Rick, make sure that the "Control Wizards" button is selected before you put on a command 
button.
Then, when you DO put the command button on, select from the wizard dialog: 
Record Operations --> Add New Record

That will make the code needed.

Steven
Message #3 by "Scott Eisenreich" <seisenreich@h...> on Thu, 22 Aug 2002 08:38:11 -0400
You will need to write an append query (see below) and attach it to the on 
click event of the command button. You may also want to set the warnings off 
(DoCmd .setwarnings warningsoff) then set them back on after the query runs.



INSERT INTO tbl_name (name)
SELECT [Forms]![New Entry].Form!name AS Expr1



>From: "Rick N" <loonievisa@h...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Macro Button to add new info
>Date: Wed, 21 Aug 2002 16:17:18 -0600
>
>I've created a form called "New Entry." In here, the person need to input 
>new names when required.
>
>When the person input the name and click on the "Enter" button, I would 
>like the button to add the new entry into the table called tbl_name.
>
>I chose/created the button (command button) in the toolbox in design view 
>of the form.
>
>
>Big hugs of thank you!
>
>
>Rick
>
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


  Return to Index