Re: Add record programmatically
anonymous_at_discussions.microsoft.com
Date: 03/21/04
- Next message: 1aae: "=Format(Now();"yyyy")"
- Previous message: Eric Butts [MSFT]: "RE: Code Hangs When Setting Recordsource"
- In reply to: Rick Brandt: "Re: Add record programmatically"
- Next in thread: Eugene: "Re: Add record programmatically - thanks"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Mar 2004 09:22:48 -0800
>-----Original Message-----
>"Eugene" <ekim@tengizchevroil.com> wrote in message
>news:B3243127-4396-4AFC-831D-
0E90D6AC9C7F@microsoft.com...
>> Hello, everybody!
>>
>> I tried to write a code for adding a new record to my
table. A simple
>[tablefield]=[value] assignment did not work.
>> Can someone say, what was my mistake and what is the
best way of adding
>records using VBA?
>>
>> Thanks in advance,
>> Eugene.
>
>CurrentDB.Execute "INSERT INTO TableName (Field1,
Field2, ...) VALUES (Value1,
>Value2, ...)",dbFailOnError
>
>In the VALUES list non numeric entries would need to be
properly delimited (')
>for text, (#) for dates. The list could also use form
references to pull the
>values from controls on open forms or the VALUES list
can be entirely replaced
>with a SELECT statement to grab rows from another table.
>
>--
>I don't check the Email account attached
>to this message. Send instead to...
>RBrandt at Hunter dot com
>
>
>.
>
- Next message: 1aae: "=Format(Now();"yyyy")"
- Previous message: Eric Butts [MSFT]: "RE: Code Hangs When Setting Recordsource"
- In reply to: Rick Brandt: "Re: Add record programmatically"
- Next in thread: Eugene: "Re: Add record programmatically - thanks"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|