Hi
I'm using Access and have a query that returns the total number of records in another query. The field is called "Total". The Query is called "Totaller".
How do I transfer the result of the query in to a variable in VBA?
I currently have a text box called "txtTotal" on a form call "frmMain" bound to the "Total" field of the query result and am testing the text box's value after updating the query. The problem is the text box doesn't update to the new value of the query result after running the query.
Instead of using a text box I want to pass the result of the query to a variable and then conditional test the variable so I know I'm querying the most up to date result.
I'm trying to avoid using hard-coded SQL and ADO. I would prefer to use Access Queries which are invoked through the DoCmd function. I have no problems running queries, it's only accessing the "Total" field in the single record result that I'm having problems with.
Any help would be appreciated.
I'm using Access and have a query that returns the total number of records in another query. The field is called "Total". The Query is called "Totaller".
How do I transfer the result of the query in to a variable in VBA?
I currently have a text box called "txtTotal" on a form call "frmMain" bound to the "Total" field of the query result and am testing the text box's value after updating the query. The problem is the text box doesn't update to the new value of the query result after running the query.
Instead of using a text box I want to pass the result of the query to a variable and then conditional test the variable so I know I'm querying the most up to date result.
I'm trying to avoid using hard-coded SQL and ADO. I would prefer to use Access Queries which are invoked through the DoCmd function. I have no problems running queries, it's only accessing the "Total" field in the single record result that I'm having problems with.
Any help would be appreciated.