J
James Martin
I'm trying to tidy up a database by starting with a fresh, blank database
(Access 2000) and importing everything from the original database. Here are
the steps I've gone through:
1. Started with a blank database.
2. Set all the properties to be the same as the original database. I've set
the properties in:
- File / Database Properties
- Tools / Startup
- Tools / Options
- Visual Basic Editor - Tools / database Properties
- Visual Basic Editor - Tools / Options
- Visual Basic Editor - Tools / References
3. Selected File / Get External Data / Import and imported all tables,
queries, etc. (including checking the boxes to import relationships and
menus & toolbars).
After doing all of this I start getting odd errors in the new database that
didn't exist in the original database. Specifically I'm getting "Run-time
error 2465 ... database can't find the field 'PaddedLotNumber' referred to
in your expression". PaddedLotNumber is a function I have in one of my
modules. If I go into debug at this point and try using PaddedLotNumber in
immediate mode, I get the same error. But as soon as I click Stop to end
processing and try using PaddedLotNumber, it works fine.
Initially I assumed that this was being caused by missing or incorrect
references, but I've checked all of them and they are identical in the two
databases. I can't find any differences between the two databases. (Except,
of course, that the system tables in the fresh one are lots smaller - which
is why I'm going through this procedure in the first place.)
I've tried decompiling, compact & repair, recompiling, etc. but I continue
to get the 2465 error in the new database.
Does anyone have any suggestions as to what might be the problem?
Thanks in advance!
James
(Access 2000) and importing everything from the original database. Here are
the steps I've gone through:
1. Started with a blank database.
2. Set all the properties to be the same as the original database. I've set
the properties in:
- File / Database Properties
- Tools / Startup
- Tools / Options
- Visual Basic Editor - Tools / database Properties
- Visual Basic Editor - Tools / Options
- Visual Basic Editor - Tools / References
3. Selected File / Get External Data / Import and imported all tables,
queries, etc. (including checking the boxes to import relationships and
menus & toolbars).
After doing all of this I start getting odd errors in the new database that
didn't exist in the original database. Specifically I'm getting "Run-time
error 2465 ... database can't find the field 'PaddedLotNumber' referred to
in your expression". PaddedLotNumber is a function I have in one of my
modules. If I go into debug at this point and try using PaddedLotNumber in
immediate mode, I get the same error. But as soon as I click Stop to end
processing and try using PaddedLotNumber, it works fine.
Initially I assumed that this was being caused by missing or incorrect
references, but I've checked all of them and they are identical in the two
databases. I can't find any differences between the two databases. (Except,
of course, that the system tables in the fresh one are lots smaller - which
is why I'm going through this procedure in the first place.)
I've tried decompiling, compact & repair, recompiling, etc. but I continue
to get the 2465 error in the new database.
Does anyone have any suggestions as to what might be the problem?
Thanks in advance!
James