By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

querydef........

P: n/a

table1 has 2 fields.

Query1 is following.
=========================
INSERT INTO Table1 ( fld1, fld2 )
SELECT [parFld1] AS Expr1, [parFld2] AS Expr2
FROM Table1;
Private Sub Command0_Click()
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs("Query1")
qd.Parameters("parFld1") = "aa"
qd.Parameters("parFld2") = 7
qd.Execute
End Sub

but, that does not working.
how?..


*** Sent via Developersdex http://www.developersdex.com ***
Aug 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"tom taol" <to*@yahoo.comwrote in message
<44***********************@news.qwest.net>:
table1 has 2 fields.

Query1 is following.
=========================
INSERT INTO Table1 ( fld1, fld2 )
SELECT [parFld1] AS Expr1, [parFld2] AS Expr2
FROM Table1;
Private Sub Command0_Click()
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs("Query1")
qd.Parameters("parFld1") = "aa"
qd.Parameters("parFld2") = 7
qd.Execute
End Sub

but, that does not working.
how?..
See if the following query works better

INSERT INTO table1 ( test, n2 )
VALUES (parFld1, parFld2);

--
Roy-Vidar
Aug 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.