Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Before I book in for a lobotomy ..

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
Ok. I've given myself brain damage now trying to sort out the usual 'easy problem'. So before I have my common sense finally removed - for the good of the internet community - can somone help me with this :-

I'm trying to split a simple string (eg, Y4) into it's component parts using the 'RIGHT' and 'LEFT' arguments:-

Dim VarCollqst As Integer

VarCollqst=RIGHT([collqst],1)


I would expect this to return the answer '4' (from the above example)

But I keep getting the error message "Can't find project or Library" with the argument RIGHT highlighted in the debug window.

The doctors are calling me and I would like to find out what I'm doing wrong before I go.
Are ther any samaritans out ther who would care to put me out of my misery ??????

Steady ...
 
What do you mean before? How'd you get in here? Didn't you have to show your card?! :)

Check VB references for MS DAO 3.XX Object Library &/or
MS VB for Apps extensibility 5.3 . Try to compile and if it won't try moving their priorities.
I just ran this in a regular module:

Sub Testme()
Dim x As Integer
Dim y As Integer
y = 12345
x = Right(y, 1)
MsgBox x
End Sub

and it worked fine. Go to it and next time we have to see your card. :)


Gord
ghubbell@total.net
 
Oh !!if life was only that simple.

I've tried the simple test (above) but I still get the error message - 'cant fint project or library'.

I tried the same sample code in my VBEnterprise Edition and it works fine. Is this a problem with my Access97 set up ??

Steady ...
 
In VB When you see your references (Tools-References) The list you see of all the libraries can be adjusted as to "which gets read first" (for lack of a better term).
The 2000 Db in front of me has VB for Apps, MS Object library 9 (yours would be 8), OLE automation, MS DAO 3.6 (yours would be 3.XX),MS ActiveX Data Objects 2.1 . And it will compile. If all else fails make a nice new Db and import everything in to it. Gremlins you know! Gord
ghubbell@total.net
 
It works !!!
Checked the DAO reference and found that there was a missing reference just before it. Unchecked the missing reference and the world is rosey once more ...

Many thanks - couldn't have spotted this one on my own

Good-bye crule world ;>)

Steady ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top