Adding two fields to a table

  • Thread starter Thread starter HowardChr via AccessMonster.com
  • Start date Start date
H

HowardChr via AccessMonster.com

I current have the following code which works perfectly now:

Code:
CurrentDb.Execute "INSERT INTO [Input] ([Loc_Desc]) VALUES (""" & Me.
List12 & """)", dbFailOnError

I would however like to add another field's information named (Lnd_Desc) as
well in the same row of table (Input). What should my syntax look like for
that one.
 
INSERT INTO [Input] ([Loc_Desc], [Other Column]) VALUES
(""" & Me.List12 & """, """ & Me.other value & """)", dbFailOnError

Shouyld be close - depending on the datatype (for the quotes required)

HTH

Corey

I current have the following code which works perfectly now:

Code:
CurrentDb.Execute "INSERT INTO [Input] ([Loc_Desc]) VALUES (""" & Me.
List12 & """)", dbFailOnError

I would however like to add another field's information named (Lnd_Desc) as
well in the same row of table (Input). What should my syntax look like for
that one.
 
Got it... that worked, THANKS!

Corey-g said:
INSERT INTO [Input] ([Loc_Desc], [Other Column]) VALUES
(""" & Me.List12 & """, """ & Me.other value & """)", dbFailOnError

Shouyld be close - depending on the datatype (for the quotes required)

HTH

Corey
I current have the following code which works perfectly now:
[quoted text clipped - 4 lines]
well in the same row of table (Input). What should my syntax look like for
that one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top