Undefined function 'Round' in expression

R

raza

Hi

i am developing an application with VB6.0 and Access 2003.

during development i needed to formate the disk and reinstall every thing
again.

now when i run my application, i gives error message on some forms where i
am sipmly running a SELECT STATEMENT. like

rs.open "some thing"

error message is

"
Error Number: -2147217900 With The Description ->> Undefined function
'Round' in expression. <<- Occured. Error source-->Microsoft JET Database
Engine
"

i have noted that this statement runs successfully on some of the forms but
some forms which are specially selecting records from a table ITEMDETAILS ,
generate error.

on other tables this query runs perfectly fine.

i am using following connection string

"Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security Info=False;" & "Data
Source=C:\Inventory.mdb"

could any one guide me please about this matter.

regards.
 
J

Jack Leach

Verify that all of your software (OS, Access and Jet) have all the most
current updates installed. Then verify that all of your project references
are what they should be.

I can't think of what else it might be other than one of those two things.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
V

vanderghast

If your application is under VB6, it is possible that ROUND is just one of
these functions you can't use inside the SQL statement outside Access
itself. A possible solution, sometimes, is to compute the expression AFTER
the recordset is open, in VB code (instead of INSIDE the SQL statement).
Alternatively, you can try to see if you have more luck with INT( 0.5+ x),
or CINT(x), rather than ROUND(x, 0), if x >=0.

Sorry to be fuzzy, I would have to reinstall VB6 to check to be sure. A bad
manipulation, from my part, after a virus infection 'disabled' my old PC
with VB6 on it... :-(


Vanderghast, Access MVP
 
D

Douglas J. Steele

I believe that's correct. It's only when you're running queries from inside
of Access that you can include functions in the query. (other that a very
short list of functions that can be used)
 
R

raza

Douglas J. Steele said:
I believe that's correct. It's only when you're running queries from inside
of Access that you can include functions in the query. (other that a very
short list of functions that can be used)

thanks to everyone

i am not using any round function in query.

it is a simple select query. as
"select * from Itemdetail"

it was working fine before new installation and still working fine for some
other tables even now.

i am just confused why it is giving dual behavior.

any other suggestion please?

i am really stuck with this

thanks and regards.
raza
 

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