RE: How do I use the INSERT INTO Statement in VBA?
- From: "Unique Name" <UniqueName@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 15:31:02 -0700
That did it. Thanks a lot ,very much appreciated.
"Ofer" wrote:
> try this
> DoCmd.RunSQL "INSERT INTO tblBatch ([Batch #],[Entry Date]) VALUES
> (Forms![frmLabourTransaction]![txtBatchUnbound],Forms![frmLabourTransaction]![TxtDateUnbound])"
>
> When the fields name contain two seperate names you need to put then in
> brackets
> []
>
> "Unique Name" wrote:
>
> > I modified the insert statement to reflect your posting but I am still
> > getting an error:
> >
> > DoCmd.RunSQL "INSERT INTO tblBatch (Batch #,Entry Date) VALUES
> > (Forms![frmLabourTransaction]![txtBatchUnbound],Forms![frmLabourTransaction]![TxtDateUnbound])"
> >
> > The error reads:
> > Syntax error in INSERT INTO Statement.
> >
> > Thanks
> >
> > "Ofer" wrote:
> >
> > > Can you please post the all insert statement and the error you getting.
> > >
> > > The syntax should be
> > > docmd.runsql "insert into target (Field1,Field2,Field3) values
> > > (Forms![FormName]![Field1Name],Forms![FormName]![Field2Name],Forms![FormName]![Field3Name])"
> > >
> > > "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
- RE: How do I use the INSERT INTO Statement in VBA?
- From: Ofer
- RE: How do I use the INSERT INTO Statement in VBA?
- From: Unique Name
- RE: How do I use the INSERT INTO Statement in VBA?
- From: Ofer
- How do I use the INSERT INTO Statement in VBA?
- Prev by Date: RE: Field Caption
- Next by Date: Re: How do I use the INSERT INTO Statement in VBA?
- Previous by thread: RE: How do I use the INSERT INTO Statement in VBA?
- Next by thread: Re: How do I use the INSERT INTO Statement in VBA?
- Index(es):
Relevant Pages
|