Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-18-2007, 07:11 AM   #1 (permalink)
leisou32
Recruit
 
Join Date: Jun 2007
Posts: 1
leisou32 is on a distinguished road
Runtime Error with Insert

I am having trouble getting the information on my form to be inserted into a table. Here is what I have:

Private Sub Command18_Click()
Dim dbs As Database
Dim rst As Recordset

Set dbs = CurrentDb
MyQuery = "Insert into tblREVISIONS (UserName, TypeofModification, DrawingNumber, Date) Values (" & UserName.Value & ", " & TypeofModification.Value & ", " & DrawingNumber.Value & ", '" & Date & "')"
DoCmd.RunSQL MyQuery

End Sub

When I try to run this I receive a Run-time error 3134 Syntax error in INSERT INTO statement and when I click Debug it highlights the DoCmd.RunSQL MyQuery

Any Help would be much appreciated. Thank You in advance.
leisou32 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime DLL selection QUantumAnenome Platform/API C++ 4 04-24-2005 11:55 AM
Mono runtime supadawg MS Technologies ( ASP, VB, C#, .NET ) 6 04-05-2005 02:58 PM
How to insert HTML form data into mysql database ? plomon PHP 5 02-06-2005 08:23 AM


All times are GMT -8. The time now is 06:51 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting