Can Anyone give me a clue about this code?

B

BRC

When i try to run the following code I get this error message
Compile Error
"Can't find project or library". StrConv is highlighted.
********
Private Sub Car_AfterUpdate()
Dim mystr As String
mystr = Me.Car.Value
mystr = StrConv(mystr, vbProperCase)
Me.Car.Value = mystr
End Sub
********
When I open object browser "strconv" show up in the; vba library, class
strings, member strconv.
I think I have all required references set but not sure
help. Thanks
BRC

This works fine in other access apps .
 
F

fredg

When i try to run the following code I get this error message
Compile Error
"Can't find project or library". StrConv is highlighted.
********
Private Sub Car_AfterUpdate()
Dim mystr As String
mystr = Me.Car.Value
mystr = StrConv(mystr, vbProperCase)
Me.Car.Value = mystr
End Sub
********
When I open object browser "strconv" show up in the; vba library, class
strings, member strconv.
I think I have all required references set but not sure
help. Thanks
BRC

This works fine in other access apps .

That PC has a missing reference.
Open any module in Design view (or click Ctrl + G).
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 Microsoft KnowledgeBase articles:
283115 'ACC2002: References That You Must Set When You Work with
Microsoft Access'
Or for Access 97:
175484 'References to Set When Working With Microsoft Access' for
the correct ones needed,
and
160870 'VBA Functions Break in Database with Missing References' for
how to reset a missing one.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
B

BRC

Thank you. I still don't understand how the "references" work but clearing
he "missing" reference solved the problem. thanks again
BRC
 

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