UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Where Do The Quotes Go!, Office 2007    
 
   
MeMedea
post Apr 17 2012, 11:32 AM
Post #1

UtterAccess Addict
Posts: 237
From: Ohio



Hello,

This continues to be an issue for me! One of these days I will figure it out but a bit of assistance today would be wonderful! Getting too few parameters error. Here is the snippet...

For Each qdf In DB.QueryDefs

Me.txt_Name = qdf.Name
Me.txt_QD = qdf.SQL

strSQL = "INSERT INTO tmp_QD (qryname, qd, db) VALUES ( [forms]![frm_QD]![txt_name] , [forms]![frm_QD]![txt_qd] ,[forms]![frm_QD]![txt_DB]);"
strdel = "DELETE * from tmp_QD;"

DBs.Execute strSQL, dbFailOnError

I have tried all kinds of variations of qoutes and no luck! Where do the qoutes go????

Thanks,

Trish
Go to the top of the page
 
+
theDBguy
post Apr 17 2012, 11:42 AM
Post #2

Access Wiki and Forums Moderator
Posts: 48,075
From: SoCal, USA



Hi Trish,

Quotes go outside of any variables or external references. For example:

CODE
strSQL = "INSERT INTO tmp_QD (qryname, qd, db) VALUES ('" & [forms]![frm_QD]![txt_name] & "','" & [forms]![frm_QD]![txt_qd] & "','" & [forms]![frm_QD]![txt_DB] & "');"

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
MeMedea
post Apr 17 2012, 11:51 AM
Post #3

UtterAccess Addict
Posts: 237
From: Ohio



Worked! Thank You!!!!
Go to the top of the page
 
+
theDBguy
post Apr 17 2012, 11:55 AM
Post #4

Access Wiki and Forums Moderator
Posts: 48,075
From: SoCal, USA



Hi,

(IMG:style_emoticons/default/yw.gif)

Glad we could help. Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 10:30 AM