I have just implemented a messaging center in our contact management application (access). This includes text and email template management, and dynamic email/txt groups by sql queries maintain in a table. This all works great, and I can select a message template, and a SQLquery stored in a table and it sends either text or email messages to my contacts. PERFECT.
NOW, on the form where I manage my SQL queries to be selected from a combo box when sending the message... I've been asked to do one or both enhancements. One, after the sql statement is entered in the form... the ability to count the number of records that query will return. And two the ability to pull up a list of the customers in the query.
I believe I open a new form from a button and pass the ID of the record of the query to a new form. Do a simple dlookup and retrieve the sql statement from the table. Then I am assuming I can point my record set to the fieldvariable holding the value of the sql statment?
My confusion is I am unsure of the vba necessary to accomplish this, or which even this needs to be placed in. Further... will the fields defined in the sql query show up in "add existing fields" to a form? Or how does it know what fields I am able to place on my form?