Reference Issue

M

magmike

Just moved my database to a new machine, and am now having issues with
very basic things. I get an error about Reference files, but none are
marked missing.

I experienced this once before, and if I remember correctly, my
database was created in Ver. 11 and I have installed Ver. 10. I was
able to find the Ver. 11 file, copy it to my computer and everything
was good after that. Does anyone know what that file is?

Thanks in advance!
magmike
 
T

Tony Toews

Just moved my database to a new machine, and am now having issues with
very basic things. I get an error about Reference files, but none are
marked missing.

Run the following code and paste the results back into this newsgroup
and we'll be able to give you some better answers.

Sub ViewReferenceDetails()

Dim ref As Reference

For Each ref In Access.References
Debug.Print ref.Name & " - " & ref.Major & "." & ref.Minor & "
- " & ref.FullPath
Next ref

End Sub

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
J

John W. Vinson

Run the following code and paste the results back into this newsgroup
and we'll be able to give you some better answers.

Sub ViewReferenceDetails()

Dim ref As Reference

For Each ref In Access.References
Debug.Print ref.Name & " - " & ref.Major & "." & ref.Minor & "
- " & ref.FullPath
Next ref

End Sub

Thanks, Tony - that'll be useful.

--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
T

Tony Toews

Thanks, Tony - that'll be useful.

You're welcome but when I review my standard blurb on this topic the
following code is better as it uses late binding and gives you the
full reference name such as you see in the references window. (Early
binding would've required the Microsoft Visual Basic for Applications
Extensibility reference. So lets make things simpler for the users.)

Sub ViewMoreReferenceDetails()

Dim refIDE As Object

For Each refIDE In
Access.Application.VBE.ActiveVBProject.References
Debug.Print refIDE.Description & " " & _
IIf(refIDE.IsBroken, "Broken", "") & _
" - " & refIDE.name & " - " & refIDE.Major & "." & _
refIDE.Minor & vbCrLf & _
" Location - " & refIDE.FullPath
Next refIDE

End Sub

--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
T

Tony Toews

You're welcome but when I review my standard blurb on this topic the
following code is better as it uses late binding and gives you the
full reference name such as you see in the references window. (Early
binding would've required the Microsoft Visual Basic for Applications
Extensibility reference. So lets make things simpler for the users.)

Also blogged at
http://msmvps.com/blogs/access/archive/2010/10/21/having-reference-problems.aspx

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
M

magmike

Also blogged athttp://msmvps.com/blogs/access/archive/2010/10/21/having-reference-pr...

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated seehttp://www.autofeupdater.com/

Forgive me for not knowing this (i'm a hobby VBist in order to
maintain my own access database), but where do I put and run this
code? I tried it in the immediate window, inside a forms project
(because it was open) and also in a brand new module - and i can't get
any of them to do anything. It's probably my fault, but I could use a
little guidance.

Thanks,
magmike
 
J

John Spencer

Install it in a VBA module.

You will have to fix the line wrap

This should all be on ONE line
For Each refIDE In
Access.Application.VBE.ActiveVBProject.References

Then put your cursor in the procedure and run the code (press F5 key). The
immediate window should show the results.



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
T

Tony Toews

You're welcome but when I review my standard blurb on this topic the
following code is better as it uses late binding

The code posted at
http://msmvps.com/blogs/access/archive/2010/10/21/having-reference-problems.aspx
is even better as it does not have the line wrapping problems and
handles broken (almost typoed borken) references gracefully.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
M

magmike

The code posted athttp://msmvps.com/blogs/access/archive/2010/10/21/having-reference-pr...
is even better as it does not have the line wrapping problems and
handles broken (almost typoed borken) references gracefully.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated seehttp://www.autofeupdater.com/

Microsoft DAO 3.6 Object Library - DAO - 5.0
Location - C:\Program Files\Common Files\Microsoft Shared\DAO
\dao360.dll
Microsoft ActiveX Data Objects 2.5 Library - ADODB - 2.5
Location - C:\Program Files\Common Files\System\ado\msado25.tlb
 
T

Tony Toews

Microsoft DAO 3.6 Object Library - DAO - 5.0
Location - C:\Program Files\Common Files\Microsoft Shared\DAO
\dao360.dll
Microsoft ActiveX Data Objects 2.5 Library - ADODB - 2.5
Location - C:\Program Files\Common Files\System\ado\msado25.tlb

Those are your only two references?

You should also have the following:
Visual Basic For Applications
Microsoft Access 11.0 Object Library.
And you shouldn't be able to remove those either.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
T

Tony Toews

Just moved my database to a new machine, and am now having issues with
very basic things. I get an error about Reference files, but none are
marked missing.

BTW I suspect the following might be your problem.
Errors using multiple versions of Access under Vista/Windows 7
http://allenbrowne.com/bug-17.html

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
D

David-W-Fenton

You're welcome but when I review my standard blurb on this topic
the following code is better as it uses late binding and gives you
the full reference name such as you see in the references window.
(Early binding would've required the Microsoft Visual Basic for
Applications Extensibility reference. So lets make things simpler
for the users.)

Does the code you're posting take acount of all the things MichKa
wrote about years ago?

http://trigeminal.com/usenet/usenet026.asp?1033
 
M

magmike

Those are your only two references?

You should also have the following:
Visual Basic For Applications
Microsoft Access 11.0 Object Library.
And you shouldn't be able to remove those either.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated seehttp://www.autofeupdater.com/

When I run the code, yes, that is all that is shown. However, when
looking at the references, I do have Visual Basic for Applications and
Microsoft Access 10.0 Object Library. I think, I my memory is correct,
that perhaps this database (which was created at a former employers
office) is looking for the 11.0 Library. I guess I need to find
someone who has that version and copy it to mine. I think that may
work.
 
M

magmike

BTW I suspect the following might be your problem.
Errors using multiple versions of Access under Vista/Windows 7http://allenbrowne.com/bug-17.html

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated seehttp://www.autofeupdater.com/

I'm using WinXP.
 
A

a a r o n . k e m p f

wow it sounds to me like linked databases are a total pain in the ass
for you, and you'd be better if you kept your logic in SQL Server
 
A

a a r o n . k e m p f

you're crazy dude.. copying a type library won't help you

find every place where you use createobject and let us know which
objects you're creating dude

-Aaron
 
T

Tony Toews

T

Tony Toews

When I run the code, yes, that is all that is shown. However, when
looking at the references, I do have Visual Basic for Applications and
Microsoft Access 10.0 Object Library.

This makes no sense to me why the VBA and Access Object library
references don't appear in the list when you run the code.
I think, I my memory is correct,
that perhaps this database (which was created at a former employers
office) is looking for the 11.0 Library.

So are you running Access 2002 or Access 2003 right now?

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
T

Tony Toews

I've gotten a copy of the Office11 MSACC.OLB file. Now how to get it
registered with the operating system so it will show up in my
available references list?

Just having the OLB file won't help as it requires all the other
Access files too.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 

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