Re: Insert New Record
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 15:00:07 -0500
"tiredoftrying" <tiredoftrying@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:42A1F62D-7373-483D-BE2F-9235B85AF8A3@xxxxxxxxxxxxx
> I need the code to insert a new record in a table that is in the same
> .mdb database that my form is in, I want a command button that on
> click will insert a record into a table called POINTS
>
> The POINTS table has 2 fields called NAME_ID and SCORE - both are
> number fields and for testing purposes I want bot to get a value of 1
> inserted when the record is created.
Here's one way:
CurrentDb.Execute _
"INSERT INTO POINTS (NAME_ID, SCORE) " & _
"VALUES(1, 1)", _
dbFailOnError
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- Prev by Date: Pulling data from values selected in dropdown list-values back to
- Next by Date: Re: Movie Database
- Previous by thread: Pulling data from values selected in dropdown list-values back to
- Next by thread: Re: Insert New Record
- Index(es):