round eror in 2003 and VB6

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top