There already is a reference to DAO. The line that cause the error is:
Public frmCreateBackup2 As Form_frmCreateBackup
It certainly does not look like it has anything to do with DAO or ADO.
This line worked well in Access97.
I'm not sure what issue you have encountered.
In a test database, just to refresh my memory, I entered:
Public frmOrders2 As Form_frmOrders
in the General Declarations section of a Standard Module and it compiled
without error. I do have a frmOrders defined, and Intellisense so detected,
as it gave me Form_frmOrders as one of the options. I am using Microsoft
Access 2003, and have automatic Windows Update to ensure it is up-to-date.
Check to make certain you are up-to-date with Service Packs and patches,
that you have everything spelled correctly, and that the Public (Dim) is in
General Declarations of a Standard Module.
Note: Access 2000 had many "issues" when released, but with all 3 Service
Packs and all updates applied, and all Service Packs applied to the Jet 4.0
database engine, it now appears generally solid and stable. It is, now, just
for the record, officially "out of support."
Because of those early issues, many of which were not corrected for a long
while, I haven't "fired Access 2000 in anger" since Access 2002 was
released.
Larry Linson
Microsoft Access MVP