missing references

A

anil

hi all
i am using office 2000 and facing the problem of missing reference.we
have lot of pc on server and all need to add data in database at
different stages but most of the time they open or any changes I make,
it give the missing reference error.

Database is in testing phase.I have tried these following things

--Compile vba code
--Fix any errors (Keep doing this until you have no errors in the vba
code)
--Remove a reference (Access has some required references you cannot
remove)
--Compile your code. If the code compiles without errors then that
reference was not needed. (Repeat until you cannot remove references)

It works well on one day on all computers but next day if any change I
make it gives error.Some times it gives error without any change also
while it worked on my pc well.I have deleted all extra
references.Mainly I get error with ADOX library and format thing which
are Microsoft ADO 2.8 for DDL and security and Microsoft Active X data
recordset 2.8 library (if I am right)

Can someone guide how to fix references so that it do not change in
other pc at least when the database is final and i have split it and
made mde file.

one more thing - If we split the database can we get it back in
original form or we have to use the backup one.

thanks
anil
 
J

james.igoe

Have you tried late-binding? As an example, instead of declaring an
Excel worksheet, one would have to DIM an object, then later in the
code set the object to an Excel worksheet. Early binding runs faster
but creates problems when you have a mixed environment. It will also
make the application somewhat future-proof, regarding OS and Office
upgrades.

Regards,

James Igoe

(e-mail address removed) || http://code.comparative-advantage.com
 
A

anil

thanks for reply
But sorry James,I did not understand.
I think I did not explain properly.I am concerned with MIssing
References
If that is related to that can u please explain bit more.
Thanks

anil
 
J

james.igoe

When you declare references, it is common, and often recommended, to
use early binding, e.g.:

Dim objXL As Excel.Application
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet

Early binding means it compiles at runtime, so the code uses the
references it was compiled with, not the existing references on the
user's PC. If you early bind on Office 2003, and try to open on Office
97/2000, you will find that the references are missing, since the 2003
references don't exist.

Late binding, is this:

Dim objXL As Object
Dim objWkb As Object
Dim objSht As Object

Set objXL = New Excel.Application
Set objXL = CreateObject("Excel.Application")

Late binding allows the application to use the existing user's
references. You can still run into problems if the feature does not
exist in the previous version of the reference, but late binding
greatly minimizes reference problems across versions. Now, it is
possible that there is no library for what you are using, but the
missing reference usually occurs because the reference exists, but is
the wrong or earlier version. Also, this applies to the other objects
that might have reference libraries.

Some links:

http://www.dicks-clicks.com/excel/olBinding.htm
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q245115


James Igoe

(e-mail address removed) || http://code.comparative-advantage.com
 
A

anil

thanks James
I understood the whole thing.
Although we have Access 2000 on all computers but i have been using
early bindings in some of the modules.I can try using late bindings
..Hope it might help.
rest thanks for the very useful information.
anil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top