PC Review


Reply
Thread Tools Rate Thread

Code to add record to a table

 
 
=?Utf-8?B?c2hhcmUgZGF0YWJhc2Ugd2l0aCBtb3JlIHRoYW4g
Guest
Posts: n/a
 
      25th Apr 2006
Hello,

I didn't use acess forms for a while and I totally forgot how
to add records using the command button in a form. I would like to get that
code.
Any help really appreciated.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2ZlciBDb2hlbg==?=
Guest
Posts: n/a
 
      25th Apr 2006
Try
DoCmd.GoToRecord , , acNewRec

--
Good Luck
BS"D


"share database with more than one users" wrote:

> Hello,
>
> I didn't use acess forms for a while and I totally forgot how
> to add records using the command button in a form. I would like to get that
> code.
> Any help really appreciated.
>

 
Reply With Quote
 
=?Utf-8?B?UmV2?=
Guest
Posts: n/a
 
      26th Apr 2006
Use the Command Button Wizard. Just drag a new button to your form, the
Command Button Wizard starts. The second option in the list is Record
Operatoions. The first item in the next list is Add New Record. click Next,
choose a lable or picture for your button, click next choose a name
(cmdAddNew) for example, and click Finish: The following code results:


Private Sub cmdAddNew_Click()
On Error GoTo Err_cmdAddNew_Click
DoCmd.GoToRecord , , acNewRec

Exit_cmdAddNew_Click:
Exit Sub

Err_cmdAddNew_Click:
MsgBox Err.Description
Resume Exit_cmdAddNew_Click
End Sub
--
Everything in EXCESS!!! If you want to taste the flavor of LIFE, Take BIG
Bytes. Moderation is for monks…


"share database with more than one users" wrote:

> Hello,
>
> I didn't use acess forms for a while and I totally forgot how
> to add records using the command button in a form. I would like to get that
> code.
> Any help really appreciated.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code which run on 1 record at a time but not on a table at once mstremmelaar@gmail.com Microsoft Access VBA Modules 1 30th Apr 2009 03:12 AM
Code to delete and add record to table Ayo Microsoft Access 2 2nd Feb 2008 09:33 PM
Delete Record in table with code =?Utf-8?B?U2FyYWg=?= Microsoft Access VBA Modules 2 29th Oct 2007 04:39 PM
Adding a Record to a table through the VB code =?Utf-8?B?TmVpbHk=?= Microsoft Access VBA Modules 1 31st May 2006 02:19 PM
trying to add new record to table with code BRC Microsoft Access Form Coding 2 21st Apr 2006 03:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:11 PM.