round eror in 2003 and VB6

S

Sally McInnis

Hi,
We're using VB6 with an access database (jet engine) - we've always used
Access 2000 - since many customers hadn't updated to office 2003 yet.
However - I needed to rebuild my development machine - so temporarily
transferred my VB6 over to another machine with office 2003. Now the queries
that have the Round function in them get an error in VB6 - Error in Database
call: Undefined function 'ROUND' in expression. The query runs fine from
Access .....

Is there something in my VB6 installation on the new computer that I missed.
I went through the properties/components and everything matched....

Thanks,
Sally
 
M

Michel Walsh

Hi,


It seems that ROUND is considered an unknown function from JET, from what
you describe. You cannot use VBA User defined function, when OUTSIDE
Access, and Round seems to be considered such a user defined function. On
the other hand, you can try

Int( 0.5+ x * CDec(100) ) / 100

instead of

ROUND(x, 2)

as example.


Hoping it may help,
Vanderghast, Access MVP
 

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