Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Access 2003 VBA
This is the forum to discuss the Wrox book Beginning Access 2003 VBA by Denise M. Gosnell; ISBN: 9780764556593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Access 2003 VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 18th, 2011, 01:22 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Docmd.RunSQL

I tried running the code below and it did not work. Can someone help?

Function SaveRecords()

Dim strSQL As String
Dim db As Database

Set db = CurrentDb()

'bind the data from the form to the table
strSQL = "INSERT INTO tblAuditTracker(Date,Datetime,Employer_Name, Case_Status, CO_SME_Name"
strSQL = strSQL & "Case_Number,Reason_Audit,Specific_Reason_Deni al, Reason_Denial,CO_SME_Recommendation,"
strSQL = strSQL & "Action_Taken_by_CO_SME, Analyst, Analyst_Recommendation,SOP_Followed,Comments)"
strSQL = strSQL & "VALUES ('Me.txtDate','Me.txtDatetime','Me.txtEmp','Me.txt Status','Me.comboSME'"
strSQL = strSQL & "'Me.comboCaseNum','Me.comboAuditReason','Me.Combo 131','Me.Combo133','Me.comboReview','Me.comboActio n',"
strSQL = strSQL & "'Me.comboAnalyst','Me.comboRecom','Me.check135',' Me.Text23');"

DoCmd.RunSQL strSQL

End Function
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Docmd.RunSql Jasonhwrd Access VBA 11 January 6th, 2011 01:02 AM
Docmd.RunSQL Armand elia BOOK: Access 2003 VBA Programmer's Reference 0 June 17th, 2009 03:47 PM
Docmd.runsql anne.burrows VB How-To 2 October 25th, 2006 08:21 AM
docmd.runsql "select RodMead Access VBA 2 July 31st, 2004 02:55 PM
Help with DoCmd.RunSQL command ricmar Access VBA 3 July 21st, 2004 03:32 PM

All times are GMT -4. The time now is 02:30 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.