Consulting

Results 1 to 5 of 5

Thread: Sleeper: SQL ROUND function work in VBA not VB6

  1. #1
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location

    Sleeper: SQL ROUND function work in VBA not VB6

    Hai All,

    below code works fine with VBA but when i run in VB6 it is not working
    and "Undefined function ROUND in expression"error occures
    I use ADO 2.5 reference in both VBA and VB6

    Why SQL ROUND only works with VBA how can i get in ROUND function in VB6

    Please Help

    I am using WINDOWS XP SP3
    MS OFFICE 2003

     
    qqry = "SELECT challan_user_no,challan_no,tds FROM temp_challan WHERE ROUND(tds,0)-tds<>0"
    rs.Open qqry, db, adOpenStatic, adLockReadOnly
    Range("a1").CopyFromRecordset rs

  2. #2
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    Any Help?

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    When you say VB, do you mean from a VB6 application?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    Yes

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I don't have VB6 installed at the moment, I will need to reload it and test it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •