Function Dates Times Class

NowUnique

Return the current date and time accurate to 1/18 of the a second. Forces the Microsoft Access Query optimizer to execute this function call for each row of the SQL UPDATE statement in which it is normally used; see below.

Signature (Visual Basic / VBA)

Public Function NowUnique( _
    ByVal vAnything As Variant _
    ) As Date

Code Example

    ? NowUnique(1)
    5/3/96 10:43:20 PM
    ? NowUnique(2)
    5/3/96 10:43:24 PM
    ? NowUnique(3)
    5/3/96 10:43:27 PM

Parameters

Parameter Description
vAnything The value of one or more columns within the Access Query. For each unique value of the expression passed via vAnything, Microsoft Access will call this function once to get the current time. If one or more Query rows have the same value for vAnything, Microsoft Access will use the previous result that was calculated by calling the function with the same argument. (There is no way to tell Microsoft Access that a function is "volatile" and to cause it to evaluate the function once for each row within the Query.)