Re: Insert New Record
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 15:38:51 -0500
"tiredoftrying" <tiredoftrying@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:CD71B565-37E0-44D1-9992-03C925791C68@xxxxxxxxxxxxx
> very helpful - but one more question, using the code you provided
> what if I wanted to use fields on my form that has the values in them
> to populate the new record
Assuming both fields are numeric, as you said:
CurrentDb.Execute _
"INSERT INTO POINTS (NAME_ID, SCORE) " & _
"VALUES(" & Me!txtNameID & ", " & Me!txtScore & ")", _
dbFailOnError
where "txtNameID" and "txtScore" are the names of the controls on your
form.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- References:
- Re: Insert New Record
- From: Dirk Goldgar
- Re: Insert New Record
- Prev by Date: Re: Drop Down Menu, Forms: Capturing data and sending to report?
- Next by Date: Re: msimatch error 13- someone posted a question as an answer - repost
- Previous by thread: Re: Insert New Record
- Next by thread: Re: Traffic Light
- Index(es):
Relevant Pages
|