|
-
Jun 10th, 2004, 10:43 PM
#1
Thread Starter
New Member
how to run a select query in VBA (Access) and store values in a variable
hello
i want to run a select query in VBA (Access) and want to store values in a variable like
str = "select CountryCode from Country where CountryName = '" & Combo22.Text & "';"
here combo22.text is the name of combo bo from where the value for where clause will b selected . now after getting this value i want to store it in a variable and then want to use it in insert query.
like
DoCmd.RunSQL "Insert into table (val1,val2) values(txtval.Text,str);"
can anybody tell me how to do it in VBA
how to execute a query in access in VBA code
and second question is that how after execution of a query we can use that reults to poulate in a combo .
waiting for an early reply
regards
Naheed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|