While running one mdb, I want to verify the existence of a form in another mdb. If the form does not exist, then I will transfer the form from the first mdb.
I am unclear on how to verify if the form (or other objects) exist in an external mdb.
dim rst as recordset
set rst = currentdb.openrecordset("SELECT MSysObjects.Name
FROM MSysObjects IN 'c:\xxx.mdb'
WHERE (((MSysObjects.Name)="& xxx & ") AND ((MSysObjects.Type)=-32768));")
if rst.bof and rst.eof then
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.