Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Access: Fix Function

Print

In Access, the Fix function returns the integer portion of a number.

The syntax for the Fix function is:

Fix ( number )

The argument number can be any valid numeric expression. Fix removes the fractional part of number and returns the resulting integer value. The data type of the return value is the same as that of the number argument. If number is a string that can be converted to a number, the return type will be a double. If the number is negative, Fix returns the first negative integer greater than or equal to number. See Int .

Fix (3.45)     returns 3
Fix (2.74)     returns 2
Fix (-16.58)   returns -16

VBA Code

Dim MyNumber
MyNumber = Fix(15.47)

This example uses the Fix function to return the integer portion of a number 15.47. Now the MyNumber variable would contain the value 15.

SQL query

You can also use the Fix function in a query.

SELECT Fix([Price]) AS Expr1
FROM Antiques


If you'd like to see how it works, enter SQL statement and press Execute
 




Tags:

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2023             www.WebCheatSheet.com All Rights Reserved.