DCount Function

Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. You can use the DCount function to determine the number of records that are in a specified set of records (a domain). Use the DCount function in a Visual Basic for Applications (VBA) module, a macro, a query expression, or a calculated control. For example, you could use the DCount function inContinue reading “DCount Function”

Weekday Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Integer) containing a whole number representing the day of the week. Syntax Weekday( date [, firstdayofweek ] ) The Weekday function syntax has these arguments: Argument Description date Required. Variant, numeric expression, string expression, or any combination of these that can represent a date. If date contains Null, Null is returned. firstdayofweek Optional. AContinue reading “Weekday Function”

Now Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) specifying the current date and time according your computer’s system date and time. Syntax Now Query examples Expression Results SELECT Now() AS Expr1 FROM ProductSales GROUP BY Now(); Returns the current system “Date and Time” in the default system Time format andContinue reading “Now Function”

DateValue Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date). Syntax DateValue ( date ) The required dateargument is normally a string expression representing a date from January 1, 100 through December 31, 9999. However, date can also be any expression that can represent a date, a time, or both a date and time, in that range. RemarksContinue reading “DateValue Function”

DatePart Function

Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Integer) containing the specified part of a given date. Warning   – There is an issue with the use of this function. The last Monday in some calendar years can be returned as week 53 when it should be week 1. For more information and a workaround,Continue reading “DatePart Function”

DateAdd Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) containing a date to which a specified time interval has been added. Syntax DateAdd ( interval, number, date ) The DateAdd function syntax has these arguments: Argument Description interval Required. String expression that is the interval of time you want to add. number Required. Numeric expression thatContinue reading “DateAdd Function”

Date Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) containing the current system date. Syntax Date Remarks To set the system date, use the Date statement. If you use the Date function with a Gregorian calendar, the behavior of Date$ is unchanged by the Calendar property setting. If the calendar is Hijri, Date$ returns a 10-character string of the form mm-dd–yyyy, where mm (01-12), dd (01-30)Continue reading “Date Function”

StrConv Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (String) converted as specified. Syntax StrConv ( string, conversion [, LCID ] ) The StrConv function syntax has these arguments: Argument Description string Required. String expression to be converted. conversion Required. Integer. The sum of values specifying the type of conversion to perform. LCID Optional. The LocaleID, if different thanContinue reading “StrConv Function”

LTrim, RTrim, and Trim Functions

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (String) containing a copy of a specified string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim). Syntax LTrim ( string ) RTrim ( string ) Trim( string ) The required stringargument is any valid string expression. If string contains Null, Null is returned. Query examples Expression Results SELECT LTrim(ProductDesc) ASContinue reading “LTrim, RTrim, and Trim Functions”

Mid Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (String) containing a specified number of characters from a string. Syntax Mid( string, start [, length ] ) The Mid function syntax has these arguments: Argument Description string Required. string expression from which characters are returned. If string contains Null, Null is returned. start Required. Long. Character position in string at which the part toContinue reading “Mid Function”