Re: How do I use the INSERT INTO Statement in VBA?
- From: "David C. Holley" <DavidCHolley@xxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 18:39:43 -0400
You cannot directly execute a SQL statement in VBA or via the Immediate Window. You have to utilize one of the provided commands - DoCmd.RunSQL or the .Execute method of a Database object (my personal new found friend). If you need help building the SQL statement, you can use the Query Builder to build it and test it and the just copy the SQL statement to your VBA procedure.
Unique Name wrote:
I am trying to enter data into a table from a form using the INSERT INTO Statement in VBA forAccess 2003. I type it as shown in the assistance(below) but keep getting errors. Is there something I am missing?
INSERT INTO target [(field1[, field2[, ...]])] VALUES (value1[, value2[, ...])
Thanks
.
- References:
- How do I use the INSERT INTO Statement in VBA?
- From: Unique Name
- How do I use the INSERT INTO Statement in VBA?
- Prev by Date: RE: How do I use the INSERT INTO Statement in VBA?
- Next by Date: Re: Difference Between Null, Empty and ""
- Previous by thread: RE: How do I use the INSERT INTO Statement in VBA?
- Next by thread: i cant open the window to microsoft office word viewer help
- Index(es):
Relevant Pages
|
Loading