I'm using an Access 2000 database and need to check the value of a table to decide on an action to perform.
Basically, I have an SQL query that returns a one-cell value of either 1 or 0. If the value is zero, I need to add a row to a table; if the value is one, I need to update a row of a table.
My question is this: How can I assign the result (one or zero) to a variable that I can use in some if logic?
I know it has something to do with creating a recordset, but my VB skills aren't what they used to be.
Any help?
Basically, I have an SQL query that returns a one-cell value of either 1 or 0. If the value is zero, I need to add a row to a table; if the value is one, I need to update a row of a table.
My question is this: How can I assign the result (one or zero) to a variable that I can use in some if logic?
I know it has something to do with creating a recordset, but my VB skills aren't what they used to be.
Any help?