Thanks to pwise and crowley16.
In this code:
FROM MSysObjects IN 'c:\xxx.mdb'
WHERE (((MSysObjects.Name)="& xxx & ") AND ((MSysObjects.Type)=-32768));")
if rst.bof and rst.eof then
does the xxx (the second one) represent the form name? If so, does it need to be in single quotes? Without quotes, I get a compile error: variable not defined.
Thanks.