My plan is to store the information in variables, display
the information in text boxes for the users review then
later (in the same screen) write the information to the
proper table.
Thanks for the information regarding the difference in a
action vs. non-action query. I think I may have an idea
but any suggestion you have would be greatly appreciated.
Thanks, JR
Quote:
>-----Original Message-----
>The DoCmd.RunSQL command does not work for non-action
queries. You're trying
Quote:
>to use it to run a "select" query, which is a non-action
query. ("Action"
>queries are "append", "delete", "make-table", etc. type
of queries.)
>What are you wanting to do with the results of the query?
That info is
>needed in order to give you some suggestions.
>--
> Ken Snell
><MS ACCESS MVP>
>> When attempting to run the following code (event from a
>> combobox) I get the following error:
>> "A RunSQL action requires an argument consisting of an
SQL
>> statement." Run-time error 2342
>> Private Sub cboDeptStrategy_AfterUpdate()
>> On Error GoTo EH
>> 'after the user selects a dept. strategy in the dropdown
>> box
>> 'this code will run to collect all the other information
>> related
>> 'to the dept. strategy. Currently will not recognize the
>> sql statement.
>> Dim stSQL As String 'variable for sql statement
>> 'sql statement to select everything from the table with
>> the dept. strategy.
>> stSQL = "Select * From dbo_tblDeptStrategy;"
>> 'run the sql statement
>> DoCmd.RunSQL stSQL
>> Exit_eh:
>> Exit Sub
>> EH:
>> MsgBox Err.Description & Err.Number
>> Resume Exit_eh
>> End Sub
>> any help would be greatly appreciated.
>> Thanks, JR