D
Dexsquab
Guest
Hello, helpful people.
I'm trying to extract a value from a table using SQL while within a VBA module attached to an onClick event used on some forms.
For the most part, the button is used to push data that's been calculated from the form input to various tables, using SQL. All the pushes work, but I also need to pull in one element.
Specifically, I've written the following:
Now I know this is going to go to the right table, find the column in question, and build a subtable with the data from that column (an integer value). The table is only one element deep, so this call will always find a single value.
My question is, how do I bring that data in as a variable in the VBA module? In other words, I want to bring the data from the column in table [Client Uptake] and place it into a variable that I can then manipulate. At the moment I'm not sure where the data will end up after the call above. What I'd like to see is the extracted data placed in a variable called intUptakeValue.
Also, clarification on whether or not I need the square brackets in the SQL statement would be appreciated.
*prays before the god of Omniscient Coding* all praise be to ye, Lord of Code!
I'm trying to extract a value from a table using SQL while within a VBA module attached to an onClick event used on some forms.
For the most part, the button is used to push data that's been calculated from the form input to various tables, using SQL. All the pushes work, but I also need to pull in one element.
Specifically, I've written the following:
Code:
strSQL = "SELECT " & strUptake & " FROM [Client Uptake];"
DoCmd.RunSQL strSQL
My question is, how do I bring that data in as a variable in the VBA module? In other words, I want to bring the data from the column in table [Client Uptake] and place it into a variable that I can then manipulate. At the moment I'm not sure where the data will end up after the call above. What I'd like to see is the extracted data placed in a variable called intUptakeValue.
Also, clarification on whether or not I need the square brackets in the SQL statement would be appreciated.
*prays before the god of Omniscient Coding* all praise be to ye, Lord of Code!