Using functions from VBA libary in queries

P

PER HILDAL

Hello :)

Im having a problem with and external libary from
Intellicad that includes a function called Left.
This is the same name as the Left function in the
VB libary in Ms Access.
How can i force the query to pick the Left function
from the VBA libary instead of the Intellicad Libary ?
Ive tried using VBA.Left("String",2) but this does not work

Any hot tip ?

Kindly

PSH

Norway
 
N

Neil Sunderland

PER said:
Im having a problem with and external libary from
Intellicad that includes a function called Left.
This is the same name as the Left function in the
VB libary in Ms Access.
How can i force the query to pick the Left function
from the VBA libary instead of the Intellicad Libary ?
Ive tried using VBA.Left("String",2) but this does not work

Any hot tip ?

Does Left$("String", 2) work?
 
R

RoyVidar

PER HILDAL said:
Hello :)

Im having a problem with and external libary from
Intellicad that includes a function called Left.
This is the same name as the Left function in the
VB libary in Ms Access.
How can i force the query to pick the Left function
from the VBA libary instead of the Intellicad Libary ?
Ive tried using VBA.Left("String",2) but this does not work

Any hot tip ?

Kindly

PSH

Norway

--------------------------------------------------------------------------------
Jeg bruker gratisversjonen av SPAMfighter.
Den har inntil videre fjernet 799 spamposter.
Privatbrukere får SPAMfighter gratis!
Prøv gratis SPAMfighter PRO her.

Hei Per!

I don't know for sure, but I don't think library prefixes work in
queries.

I think I'd try either creating my own function (in a standard
module), utilizing the Left function. In a module, you can prefix
with library - Air Code without errorchecking and not handling
Nulls...

Public Function MyLeft(ByVal v_strIn As String, _
ByVal v_lngLen as Long) As String
MyLeft = VBA.Left$(v_strIn, v_lngLen)
End Function

or try some of the other string manipulation functions - for instance
Mid() should work in this setting.

Mid("String";2;2)
 
K

Kc-Mass

You may want to check your references. (When in a module - Menu Tools:
References).
Make sure that your Itellicad library is lowest priority of activated
libraries.
I believe Access uses the first reference to a function in the priority
order of the libraries.
 

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