My Assistant
![]() ![]() |
|
|
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 |
|
|
|
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) |
|
|
|
Apr 17 2012, 11:51 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 237 From: Ohio |
Worked! Thank You!!!!
|
|
|
|
Apr 17 2012, 11:55 AM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 48,075 From: SoCal, USA |
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 24th May 2013 - 10:30 AM |