All right, fair question. At some point, i will be leaving the workplace i'm
at. They do work for a government contractor, which if you're not familiar
with them, means they don't change for many, many years at a time. So along
this line of thinking, and based on the current set of databases i've built
for them, i'm going to make a single external table for use as a "name list"
so that they can add and remove names from just that one table, and set up
access to several databases. It will be simple and to the point, and not
require any real knowledge to operate. What i'm using now is a set of VB
comparisons to strings. They have to be added and removed manually. I'm
still in the process of re-learning my SQL and my VB as i hadn't used them
for about 8 years previous to my current job.
So
if [Blah].MailLog = "string"
then DoCmd.openQuery "queryname"
is a valid statement, for comparing an entire table's contents with
fieldname.databasename and so on being the correct syntax?
Okay, take a step backwards. Why are you trying to do this?
If you want to get all the records where a fieldname in a table in
your database = "string" then why not just open a query based on the
table and then process it in code?
dim qdf as dao.querydef
dim rs as dao.recordset
set qdf=DBEngine(0)(0).Querydefs("QueryName")
set rs=qdf.OpenRecordset
do until rs.eof
'send your e-mail here
rs.movenext
loop
rs.close