Solved

MS Access 2010 VBA Syntax to Insert Row in Button on click method

Posted on 2014-09-12
3
577 Views
Last Modified: 2014-09-12
I need to insert a row to a table.

Private Sub btnSaveFeature_Click()

Dim strInsertSQL As String


strInsertSQL = "INSERT INTO tblFeature (Cat_No, Fea_ID, Fea_Name)
VALUES ( 120, '6.1.1', 'NA')"

What is the syntax to run this SQL Statement?

Thanks
0
Comment
Question by:Dovberman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40319460
Dim strInsertSQL As String


strInsertSQL = "INSERT INTO tblFeature (Cat_No, Fea_ID, Fea_Name)
VALUES ( 120, '6.1.1', 'NA')"
Currentdb.Execute strInsertSQL
0
 

Author Comment

by:Dovberman
ID: 40319563
Perfect.

Thanks
0
 

Author Closing Comment

by:Dovberman
ID: 40319564
Perfect. Thanks,
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question