a97ChangeMDIBackground

  • Thread starter Thread starter anonymous
  • Start date Start date
A

anonymous

I thought I'd try the color picker,
A97ChangeMDIBackgroundVer8 from the Lebans site.

When I click any buttone I receive an error:
Complile error
Can't find project or library.

and String$ is hilited.

We tried it on another machine at work that has OfficeXP,
and WindowsXP, and it worked,

My machine has Access97, and Windows2k.

is there something I should change in that line?

Here is one code that receives the error (this is the one
I'd like to use).

Function aDialogColor(ByVal hwnd As Long) As Long
Dim x As Long, CS As COLORSTRUC, CustColor(16) As Long

CS.lStructSize = Len(CS)
If hwnd <> 0 Then
CS.hwnd = hwnd
Else
CS.hwnd = Application.hWndAccessApp
End If
CS.Flags = CC_SOLIDCOLOR
CS.lpCustColors = String$(16 * 4, 0)
x = ChooseColor(CS)
If x = 0 Then
' ERROR - use Default White
'prop = RGB(255, 255, 255) ' White
aDialogColor = -1 'False
Exit Function
Else
' Normal processing
aDialogColor = CS.rgbResult
End If

End Function
 
Hi,

This is just a guess.
The machine may have a missing reference.
The arch-nemesis of Access is missing references.

Here is some past advice from the experts:

Open any module in Design view.
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

See these links for more information:

http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

http://members.iinet.net.au/~allenbrowne/ser-38.html

http://www.trigeminal.com/usenet/usenet026.asp

ACC2002: References That You Must Set When You Work with Microsoft Access
http://support.microsoft.com/?id=283115

ACC97: References That You Must Set When You Work with Microsoft Access
http://support.microsoft.com/?id=175484

ACC: VBA Functions Break in Database with Missing References
http://support.microsoft.com/?id=160870

Hope that helps,
Jeff Conrad
Bend, Oregon
 
You've got a missing Reference on that install of Access. Since the code
you posted does not use any external References it does not have
anything to do with your issue. Follow the links Jeff gave you.
:-)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top