Hi,
I have a button which launches a make table query, starts MS Word, which reads from the table and mail merge's some of the results.
The query will typically return a good number of records, but I only want to mail merge ones where the field 'LetType' equals 6M or 30M. Often, there are no records which meet this criteria, therefore I would like Access to check whether any of the records returned in the query have 'LetType' (field name) 6M or 30M, if not, then to display a message that 'No Data Found' and quit the process, otherwise continue with the make table and Launch Word. (It doesn't really matter whether the check is carried out before the table is made or after) Any suggestions on how to do this would be welcome.
I have successfully checked whether a query returns any results, (If Dcount>0 [query]Then run Macro Else…etc etc). I’m not sure how to check whether a particular field equal ‘X’ or ‘Y’.
Thanks for any guidance, I’m off to Google again…
FrankyG
I have a button which launches a make table query, starts MS Word, which reads from the table and mail merge's some of the results.
The query will typically return a good number of records, but I only want to mail merge ones where the field 'LetType' equals 6M or 30M. Often, there are no records which meet this criteria, therefore I would like Access to check whether any of the records returned in the query have 'LetType' (field name) 6M or 30M, if not, then to display a message that 'No Data Found' and quit the process, otherwise continue with the make table and Launch Word. (It doesn't really matter whether the check is carried out before the table is made or after) Any suggestions on how to do this would be welcome.
I have successfully checked whether a query returns any results, (If Dcount>0 [query]Then run Macro Else…etc etc). I’m not sure how to check whether a particular field equal ‘X’ or ‘Y’.
Thanks for any guidance, I’m off to Google again…
FrankyG